'How in Ruby on Rails(6.1) the log levels are decided?
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
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | eugen |
