Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot requests: to "re-run your application with 'debug' enabled" - how do I?

Tags:

I am getting a myriad of exceptions trying to run my spring boot project in Eclipse. What they have in common is a "re-run your application with 'debug' enabled" How exactly is this done?

  • A maven setting ?
  • Use the debugger ?
  • A command line argument ?
  • A vm argument ?
  • A spring application settings ?

I tried a few to no avail. Your assistance much appreciated!

like image 555
Oren Bochman Avatar asked Jul 07 '18 17:07

Oren Bochman


People also ask

How do I enable debug in spring boot application properties?

You can also enable a “debug” mode by starting your application with a --debug flag. You can also specify debug=true in your application. properties . When the debug mode is enabled, a selection of core loggers (embedded container, Hibernate, and Spring Boot) are configured to output more information.

How do I disable debug in spring boot?

In your case you must set logging. level. root on one of level from INFO, WARN, ERROR,FATAL or OFF to turn off all logging.


1 Answers

Adding the following line

debug=true

to the application.properties or application.yml, file should help. You'll get more detailed logging. Generally, if you want to see more fine-grained log messages from all members of a given package, you can set that by adding a line such as

logging.level.<package_name>=<LOGGING_LEVEL>

for example:

logging.level.org.springframework.context=DEBUG

These log messages may be helpful to find the core of the problem (in this case why a given exception was thrown)

like image 50
Joe Doe Avatar answered Sep 21 '22 14:09

Joe Doe