aspose file tools*
The moose likes Other Open Source Projects and the fly likes log4j: how to redirect log messages to different appenders Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "log4j: how to redirect log messages to different appenders " Watch "log4j: how to redirect log messages to different appenders " New topic
Author

log4j: how to redirect log messages to different appenders

Lorana Berd
Greenhorn

Joined: May 05, 2008
Posts: 7
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

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Lorana,

Do a search on this forum, this question has been answered many times before


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
jQuery in Action, 2nd edition
 
subject: log4j: how to redirect log messages to different appenders