I want to get the output of Rail.logger.info in the console while running code through rails console. By default I don't see it printing it. Is there any configuration that I need to change ?
Thanks
Asked
Active
Viewed 2,232 times
5

snow_leopard
- 1,466
- 2
- 20
- 36
1 Answers
2
Once you open the Rails console:
Rails.logger = Logger.new(STDOUT)
If you need to change the log level:
Rails.logger.level = Logger::DEBUG
This keeps the change localized to your console process, so you can see only the output from it and not from the rest of the Rails processes that might be running.

Robin Daugherty
- 7,115
- 4
- 45
- 59