Skip to content

gorkemblm/dynamically-log-level-modifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How it's work dynamically-log-level-modifier?

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;

PATH : httpserver

Default log levels for httpserver: Screenshot from 2021-12-26 19-33-41

Rest call for httpserver: Screenshot from 2021-12-26 19-41-25

After changing the log level for httpserver: Screenshot from 2021-12-26 19-34-04

PATH : firstchildrenpath

Default log levels for firstchildrenpath: Screenshot from 2021-12-26 19-40-19

Rest call for firstchildrenpath: Screenshot from 2021-12-26 19-40-32

After changing the log level for firstchildrenpath: Screenshot from 2021-12-26 19-40-46

PATH : secondchildrenpath

Default log levels for secondchildrenpath: Screenshot from 2021-12-26 19-42-50

Rest call for secondchildrenpath: Screenshot from 2021-12-26 19-42-56

After changing the log level for secondchildrenpath: Screenshot from 2021-12-26 19-43-03

If you want to change the log level of all child loggers, you should send parameter as loggerName=root.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages