News for hackers. Stuff that matters.
Re:The Five Levels of Logging by helper on Friday September 14, 2018 @02:02PM (#17989374)
We use 3 log levels:

- Debug: should not show up in normal logs but you can turn it on down to a specific log message in a running process without restarting. We use structured logging so we have the additional ability to turn on debug messages down to a specific key=value pair (or set of key=value pairs).

- Info: An interesting event occurred that someone might care about. This could be an error that we were able to handle or just some important event.

- Alert: An error case that should not happen has occurred and someone needs to look into it. In addition to logging the event, an external system should be notified (e.g. create a ticket, page someone, send an email, etc).

Re:The Five Levels of Logging by maxxxxx on Friday September 14, 2018 @02:36PM (#17989674)
"- Debug: should not show up in normal logs but you can turn it on down to a specific log message in a running process without restarting. We use structured logging so we have the additional ability to turn on debug messages down to a specific key=value pair (or set of key=value pairs)."

I always turn on the highest log level unless there is a very strong performance reason against doing so. I have been able to resolve a lot of issues over the years because I had good logging when something went wrong.

I don't really see alerts as logging. They are an integral part of the application's behavior.