What is the most preferred log level in production Rails app? I just read in doc that logging has a small impact on production. Currently my log level is set as info
.
Some of them are important, others less important, while others are meta-considerations. The standard ranking of logging levels is as follows: ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF.
A log level or log severity is a piece of information telling how important a given log message is. It is a simple, yet very powerful way of distinguishing log events from each other. If the log levels are used properly in your application all you need is to look at the severity first.
The default log configuration echoes messages to the console as they are written. By default, ERROR -level, WARN -level, and INFO -level messages are logged. You can also enable a “debug” mode by starting your application with a --debug flag. You can also specify debug=true in your application.
It doesn't really matter. You probably don't want it set to info
if you're storing your logs in a text file on the server but if you're piping all of your logs to a service like Papertrail it shouldn't matter.
That said, you probably won't find the information in info
particularly useful in Production since you won't be debugging in a live environment.
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