Este conteúdo não está disponível no idioma selecionado.

Chapter 1. Log Levels


Logging is an essential part of monitoring and debugging software applications. It provides insight into how the application is functioning at runtime and can help you detect and diagnose issues. By adjusting the log level, you can control the amount and type of information displayed in the logs, ranging from highly detailed diagnostic output to the most critical errors. With this flexibility, you can customize logging output to match your current requirements, whether during development, testing, or production.

You can choose from the following log levels, listed in order of decreasing verbosity:

  • debug: Detailed information, typically useful only when troubleshooting.
  • info: General information about the operation of the application. This is the default level.
  • warn: Indicates potential issues or situations that might require attention.
  • error: Indicates errors that have occurred but might not prevent the application from continuing.
  • critical: Indicates critical errors that require immediate attention and are likely to prevent the application from functioning correctly.

You can control the verbosity of the logging by setting the log level. The log level determines the minimum severity level of events displayed in the console. For example, if the log level is set to 'info', events with a severity level of 'debug' are ignored.

To increase the log level, you can set the LOG_LEVEL environment variable to a higher severity level, such as 'warn' or 'error'. However, increasing the log level might not result in more output if the existing code primarily emits logs at lower severity levels, for example, 'debug' or 'info'. In such a case, adjust the logging statements within the code to use higher severity levels to see more output.

No additional steps are required beyond setting the LOG_LEVEL environment variable, but its effectiveness depends on the existing logging statements in the code.

Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2026 Red Hat
Voltar ao topo