Skip to content

An example of how to change the log level at run time by using Spring Boot & Actuactor

Notifications You must be signed in to change notification settings

fredmosc/Log4J-Runtime-Change

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CHANGE LOG LEVEL AT RUNTIME

An example of how to change the log level at run time by using Spring Boot & Actuactor

Just run the application and to change log level, make a POST request to:

localhost:8080/actuator/loggers/ROOT

and in the body content enter the below code like a JSON application

{
    "configuredLevel": "warn"
}

or, with you want, make a CURL request like that:

curl -X POST \
  http://localhost:8080/actuator/loggers/ROOT \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "configuredLevel": "warn"
}'

About

An example of how to change the log level at run time by using Spring Boot & Actuactor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages