In log4j, is it possible to filter not only on a package / class level, but also on a method level? If yes, how?
Thanks for any hint :-)
In log4j, is it possible to filter not only on a package / class level, but also on a method level? If yes, how?
Thanks for any hint :-)
In log4j you do not "filter" (I assume you refer to the config where you define the log levels per logger) per package or class, you filter per logger name.
It just happens that most of the time one uses the name of a class to instantiate a logger, so the name of the logger ends up being the canonical name of the class. You can just give any name to your logger and then use this name to configure it.