I have a rails app with a lot of information in the seed process. Is there a way to set it so that it logs to one of the log files?
If your just running your seeds with the rake db:seed
task you could do:
$ rake db:seed --trace
Rails.logger.debug("Message") will go to the log/development.log file.
You can do this in console tail -f log/development.log
to see it in action.
Try
say_with_time("Doing this and that") do
# seed stuff
end
to make your seeds more verbose, and redirect to a file via '> log'. I suppose you could hijack the logger at init time and use a file-logger instead, if you don't like the '> log' solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With