Log levels
Not every log message is useful. Log levels help you categorize messages, so you can filter out just what you need. You want logging to be useful, and too much isn’t always better.
Use the granularity that best matches your needs. Follow the best practices of tools you build that have log level support. It’s no fun when you start monitoring for errors and every existing log message is marked at that severity.
You can adjust your runtime log level based on your environment, so you’re not paying a high monetary and performance cost for expensive “information” logs.
Even command-line tools have log levels or similar features; many support --verbose
to get more information about their inner workings.