replaced STDOUT with logger.info

This commit is contained in:
Priit Tark 2015-03-27 15:01:51 +02:00
parent 45ab4ce2fa
commit f146bca5c7

View file

@ -174,9 +174,9 @@ class Contact < ActiveRecord::Base
end
def destroy_orphans
STDOUT << "#{Time.now.utc} - Destroying orphaned contacts\n"
logger.info "#{Time.now.utc} - Destroying orphaned contacts\n"
count = find_orphans.destroy_all.count
STDOUT << "#{Time.now.utc} - Successfully destroyed #{count} orphaned contacts\n"
logger.info "#{Time.now.utc} - Successfully destroyed #{count} orphaned contacts\n"
end
end
end