Is there a way I can configure log4j to allow to me do a logger.debug("....") where it would only output if it's being used in a particular patch?
I'm adding a new feature to existing code to a very large code base, and if I were to simply use logger.debug("..."), then it would be useless since there are many project that also outputs to logger.debug. I also understand that the debug could be turned on depending on packages, however, my modification spans different packages.
Is it possible to do something like logger.debug("patch1", "debugging message...")..... thus, somewhere in the configuration file, this line will only be active if I set something like debuglevel="patch1"
Otherwise, I would have to use system.out.println("patch1------------------------" + message); Then I would have to enable and disable a particular println manually, which is also tedious.