• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Log4j and appenders

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
reply
    Bookmark Topic Watch Topic
  • New Topic