• 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

Urgent...Logging for Two different Enterprise applications using Log4j

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

We have developed two enterprise application (both running under IBM WAS 5.1) that uses Apache's Log4j for logging.

I placed both the log4j-1.2.11.jar & log4j.properties under lib folder. The problem here is I want to create two different files (under two different directories) for those two enterprise applications by using the default log4j.properties file.

My log4j.properties file look like :

log4j.rootLogger=INFO,APP1,APP2

log4j.appender.APP1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.APP1.File=c:\Application1.log
log4j.appender.APP1.layout=org.apache.log4j.PatternLayout
log4j.appender.APP1.DatePattern='.'yyyy-MM-dd

log4j.appender.APP1.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss,SSS} %5p - %x %m%n

log4j.appender.APP2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.APP2.File=c:\Application2.log
log4j.appender.APP2.layout=org.apache.log4j.PatternLayout
log4j.appender.APP2.DatePattern='.'yyyy-MM-dd

log4j.appender.APP2.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss,SSS} %5p - %x %m%n


Pls. provide me the solution.
[ February 14, 2006: Message edited by: Mohsin Kayal ]
 
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic