Log Levels
Levels |
Usage |
---|---|
Error |
It is used for non-recoverable error. |
Warning |
It is used for recoverable error. |
Info |
It is used for audit purpose. |
Debug |
It is used for investigation. |
Trace |
It is used for detailed investigation. |
Spring Boot – Logging
Logging in Spring Boot plays a vital role in Spring Boot applications for recording information, actions, and events within the app. It is also used for monitoring the performance of an application, understanding the behavior of the application, and recognizing the issues within the application. Spring Boot offers flexible logging capabilities by providing various logging frameworks and also provides ways to manage and configure the logs.
Why to use Spring Boot – Logging?
A good logging infrastructure is necessary for any software project as it not only helps in understanding what’s going on with the application but also to trace any unusual incident or error present in the project. This article covers several ways in which logging can be enabled in a spring boot project through easy and simple configurations. Let’s first do the initial setup to explore each option in more depth.