Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preferred Log Level in Production

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.

like image 206
tessie Avatar asked Mar 09 '17 10:03

tessie


People also ask

What is the best log level?

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.

What is production log level?

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.

What is the default log level?

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.


1 Answers

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.

like image 123
Max Woolf Avatar answered Oct 04 '22 20:10

Max Woolf