Is there a way to change the logging level of a class using a System Property in the launcher? I want to be able to easily and quickly change the debug level of a class depending on which class I'm working on. Being able to do it at launch time with something like -Dcom.example.package.myclass.logger.level=TRACE
or
-Dcom.slf4j.trace=com.example.package.myclass
would be very useful.
I'm using slf4j/logback but i'm also interested in a way to do it in log4j
I know how to change the level programatically, but i don't want to have to change code, just the launcher
If it's relevant, I'm using a configuration file logback-test.xml
If it's not possible, is there another trick to do this without changing code or having to pollute the clean xml file?