Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

log4j: how to redirect log messages to different appenders  RSS feed

 
Lorana Berd
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have console and file appender both defined in log4j.xml and I want to
write some messages to console appender and some to the file appender.
How do I do that in the code ?
Where do I specify which appender the message should go to?

Thanks a lot.
lorana

 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lorana,

Do a search on this forum, this question has been answered many times before
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!