RollingFileAppender is deleting backup files

2006-11-07 Thread Reddy, Sanket \(US - Hyderabad\)
Hi Guys I am working on RollingFileAppender, with the following property file log4j.rootLogger=INFO, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%

NPE from DOMConfigurator.configureAndWatch

2006-11-07 Thread Chris Cheshire
Hi, I am using log4j 1.2.13 in a web app deployed on SJAS 9. The logging is initialised in a ServletContextListener subclass in the contextInitialised method. String configFile = context.getInitParameter("log4j.config_file"); try { DOMConfigurator.configureAndWatch(conf

Re: Using log4j in Tomcat

2006-11-07 Thread Jacob Kjome
James is correct about the fact that Tomcat sets this system property. However, you should be using ${catalina.base} instead of ${catalina.home}. You may very well have a separate instance of Tomcat with a different base directory than that of ${catalina.home}. In that case that you truly are r

Re: Using log4j in Tomcat

2006-11-07 Thread James Stauffer
I think log4j can resolve any system property in ${}. I think Tomcat usually sets that property. On 11/7/06, ying lcs <[EMAIL PROTECTED]> wrote: How can log4j resolve '${catalina.home}' when it reads it from the property files? And can you please tell me who will setup this '${catalina.home}/'?

Re: Using log4j in Tomcat

2006-11-07 Thread ying lcs
How can log4j resolve '${catalina.home}' when it reads it from the property files? And can you please tell me who will setup this '${catalina.home}/'? the startup script of tomcat? On 11/7/06, James Stauffer <[EMAIL PROTECTED]> wrote: You can make it relative to the tomcat install by using ${c

Re: Using log4j in Tomcat

2006-11-07 Thread James Stauffer
You can make it relative to the tomcat install by using ${catalina.home}/access.log (I assume that works in properties files but I know it does in xml files). On 11/7/06, ying lcs <[EMAIL PROTECTED]> wrote: I have the following log4j property file, and I am using log4j in my tomcat. Can you ple

Using log4j in Tomcat

2006-11-07 Thread ying lcs
I have the following log4j property file, and I am using log4j in my tomcat. Can you please tell me how can I specify the location of the log file so that it is in the inside the webapp directory of the tomcat that I deploy? I don't know the location of the tomcat, so I can't put absolute path.

RollingFileAppender is deleting backup files

2006-11-07 Thread Reddy, Sanket \(US - Hyderabad\)
Hi Guys I am working on RollingFileAppender, with the following property file log4j.rootLogger=INFO, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%

RollingFileAppender is deleting backup files

2006-11-07 Thread Reddy, Sanket \(US - Hyderabad\)
Hi Guys I am working on RollingFileAppender, with the following property file log4j.rootLogger=INFO, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%

RE: How to configure 2 logger in the same configuration property file

2006-11-07 Thread Blok, Eelke
Hi, Hmm... I'm getting the feeling you don't fully understand what you're doing (no offence). You are naming your loggers and your appenders to something that looks a lot like logging levels, which at the very least makes things confusing when, as a human, you're trying to understand what is going