File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Log4j and appenders Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Log4j and appenders" Watch "Log4j and appenders" New topic
Author

Log4j and appenders

David Edds
Greenhorn

Joined: Dec 06, 2004
Posts: 20
Hi,

I'm VERY new to Logging and am using Log4j with JDK 1.3. I would like to send any log messages which are DEBUG or higher to a file and any messages which are ERROR or higher to the console. I have achieved this in my properties file (below) which uses the "threshold" property. Is this the correct / best way to achieve what I want? Shouldn't I be using "appender additivity" and have my a2 as some sub-appender of a1? If so, how do I modify my properties file to achieve this?

Thanks in advance,
Dave

 
 
subject: Log4j and appenders
 
Threads others viewed
setting up log4J for application
Log4j logs debug into info...
customize appenders within rootCategory
Frontman 2 FileNotFoundException ?
Daily log appender query
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com