I want the debug logs to appear in info log level so that other unnecessary logs from debug do not appear inside production. The statement configure.log_level= :info is already written inside production.rb file, but i am not able to see rendered message logs unless I add another statement for :debug as well. I only want the rendered messages to be shown at info level and not on debug level. What is the way to do it? I think if we find out how rails decide which logs are info and which are not then we can do something about it. Help me out here. Thanks
Asked
Active
Viewed 205 times
1 Answers
0
Any message shown on the info
level will also appear at the debug
level - see the ruby documentation for the Logger class.
If you are asking about which messages Rails shows on info
and which are shown on debug
, I don't think there's an easier way short of looking through the source code.
Similarly, if you're looking for logging statements inside your application code, search for logger.info
or logger.debug
.

eugen
- 8,916
- 11
- 57
- 65
-
Is there any way I can get rendered messages to be shown in the logs when I set the log level to :info in production? – Khubaib Hadi Usmani Feb 25 '22 at 03:58
-
Not unless you change `config.log_level = :debug` in `production.rb` - debug level messages are not shown in INFO mode. – eugen Feb 25 '22 at 13:06
-
Is there any way in which we can change the level of messages from debug to info? I mean let say rendered messages show up as debug but i want them to be shown up as info. Is it even possible? – Khubaib Hadi Usmani Feb 28 '22 at 03:52
-
Not without going through the application code and change all the logging statements from `debug` to `info` – eugen Feb 28 '22 at 11:44