Hey, I'm trying to create a loggers hierarchy in my application. (I'm using standard java logger) To do so, I'm creating first the "grandfather" of all loggers by simply call: (In a static block) Logger.getLogger("myapplication"); Then, every concrete logger ask for logger: Logger.getLogger("myapplication.package1.Main"); and I create his father: Logger.getLogger("myapplication.package2");
Now, I'm using JConsole in order to use RMX to change logging level. When I call the getLoggerParentName for myapplication.package1.Main, I get myapplication.package1, and for myapplication.package1 I get myapplication.
But setting the logger level of myapplication does not affect the child's level. (Although setting the myapplication.package1 level does affect the Main's logger level).
How come? Am I missing something? As far as I dug into the Logger class, I think this should work...