spring enable debug log level
Step 1: Locate the application.properties or application.yml file
To enable debug log level in a Spring application, you need to locate the application.properties
or application.yml
file. This file is typically found in the src/main/resources
directory of your Spring project.
Step 2: Open the application.properties or application.yml file
Open the application.properties
or application.yml
file using a text editor or an integrated development environment (IDE). This file contains various configuration properties for your Spring application.
Step 3: Add the log level configuration
Add the following line to the application.properties
file if you are using the properties file format:
logging.level.root=DEBUG
Or add the following lines to the application.yml
file if you are using the YAML file format:
logging:
level:
root: DEBUG
Step 4: Save the changes
Save the changes to the application.properties
or application.yml
file.
Step 5: Restart the application
Finally, restart your Spring application for the changes to take effect. The application will now log messages at the debug log level.
That's it! By following these steps, you can enable the debug log level in your Spring application and start seeing debug-level log messages in your application logs.