Este contenido no está disponible en el idioma seleccionado.

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

Pruebe, compre y venda

Comunidades

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de la documentación de Red Hat

Legal Notice

Theme

© 2026 Red Hat
Volver arriba