• Post Reply Bookmark Topic Watch Topic
  • New Topic

log4j - display logger.debug(...) from one class to only a specific log file  RSS feed

 
Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want logger.debug statement from one class (org.myorg.MyClass) to go to only one log file (logY.log, which is appender A1) and not to show in logX.log. With configuration below, logger.debug from org.myorg.MyClass is now shoing in both logX.log and logY.log.

What is the least amount of change (this is maintenance code) that can be done in the following log4j.properties to show logger.debug("aaa") from org.myorg.MyClass only in logY.log (appender A1) and not show in logX.log?

Following is log4j.properties:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!