Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Log4j and appenders  RSS feed

David Edds
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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,

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!