The project aims to dynamically change the log level during runtime.
When you wake up the main thread, 3 different threads also stand up.
Since a local http server is created in the project, we change the level changes by rest-call.
We make the change using a POST method.
endpoint: localhost:8080/log/change-level
This method takes 2 different parameters.
1 - loggerName : requests the classpath of the class to which the log level will change.
2 - logLevel : it specifies which level we want to convert to.
Usage images are below;
Default log levels for httpserver:
After changing the log level for httpserver:
Default log levels for firstchildrenpath:
Rest call for firstchildrenpath:
After changing the log level for firstchildrenpath:
Default log levels for secondchildrenpath:
Rest call for secondchildrenpath:
After changing the log level for secondchildrenpath:
If you want to change the log level of all child loggers, you should send parameter as loggerName=root.