Adding multiple configuration files to log4j

2006-06-23 Thread jaikiran pai
Hi, Currently, i could not find a way to use add multiple files as configuration files for log4j. Here's why i needed the same: - I have a 3rd party application which uses log4j and has its configurations in log4j.xml - I am integrating my application with the 3rd party application. - My a

Re: Adding multiple configuration files to log4j

2006-06-26 Thread jaikiran pai
Thanks, James. Will try out RepositorySelector. -Jaikiran James Stauffer <[EMAIL PROTECTED]> wrote: Search for something called a RepositorSelector (or something like that). On 6/23/06, jaikiran pai wrote: > Hi, > Currently, i could not find a way to use add multi

Re: Ant Log4J not working

2006-06-29 Thread jaikiran pai
Rohit, This means that the log4j.properties file that you have created in NOT in the classpath. Make it available in the classpath. regards, -Jaikiran Rohit B Rai <[EMAIL PROTECTED]> wrote: I am trying to use Log4J for logging from Ant but it gives these errors. log4j:WARN No appen

Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
Is there some way (API), through which i can get a collection of appenders that have been mentioned(configured) through log4j config files? Consider the following log4j.xml: http://jakarta.apache.org/log4j/"; debug="false

Re: Log4j Configuration without use of configandwatch

2006-07-04 Thread jaikiran pai
>but I don't see how you could put this method in each class that instantiates >a logger You dont have to put the statement in each and every class that uses a logger. Use can just invoke it once(in may be some central class of your application), thats it. sudhakardvvn <[EMAIL PROTECTED]

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
DER" ) ) == null ) Object[] result = new Object[2]; result[0] = log; result[1] = a; return result; } With this method you can only find the appender CONSOLE because you didn't attacht the appender FILE to any logger. Heri > -Original Message- > From: jaikiran pai [mail

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
ry. But I am not shure if this is a set already asked for loggers (by Logger.getLogger(..)) or if this is a set of configured loggers or both. You have to try or annother log4j guru can answer this. Heri > -Original Message- > From: jaikiran pai [mailto:[EMAIL PROTECTED] > Sent: T

Re: FW: No appenders could be found for logger

2006-07-05 Thread jaikiran pai
o std. out. telling you how it tries to configure itself. On 6/29/06, jaikiran pai <[EMAIL PROTECTED]> wrote: > Rohit, > This means that the log4j.properties file that you have created in NOT in the classpath. Make it available in the classpath. > > regards, > -Ja

Re: log4j extra level problem

2006-07-11 Thread jaikiran pai
I had a look at the code of log4j and here's what it does in the log method, which you are calling: - /** This generic form is intended to be used by wrappers. */ public void log(Priority priority, Object message) { if(repository.isDisabled(priority.level))

Re: TimeStamp for the backupfiles

2006-07-13 Thread jaikiran pai
Try this out: regards, -Jaikiran sudhakardvvn <[EMAIL PROTECTED]> wrote: Hi, Iam using log4j in my applicaiton. I am using rollingFileAppender class for creating backup files. My backup log files will be logfile.1,l

Re: Changing logging level for a specific appender via code

2006-07-14 Thread jaikiran pai
I guess what you are looking for is setting the threshold level on the appender. If so, then have a look at the public void setThreshold(Priority threshold) method on org.apache.log4j.AppenderSkeleton regards, -Jaikiran "Gundersen, Richard" <[EMAIL PROTECTED]> wrote: Hi

Re: Set a SystemProperty to specify an absolute path for a FileAppender

2006-07-24 Thread jaikiran pai
How do you start your web/app server. Usually, its through a bat file which contains the java command. If that's the case, then you can pass your system properties as part of java command. Something like: java -D"myWebApp=c:/somepath" . You will have to check the bat file whic

Re: Set a SystemProperty to specify an absolute path for a FileAppender

2006-07-24 Thread jaikiran pai
The only solution that comes to my mind if you want to set the property even before log4j is started is to set it through the java command as i mentioned in my earlier mail. However, if you want to set the property when your application is *getting deployed*, then there appears to be another way

Re: Using NDC

2006-08-16 Thread jaikiran pai
See if these articles help: 1) Section NDC/MDC at : http://www.onjava.com/pub/a/onjava/2002/08/07/log4j.html?page=3 2) http://blog.f12.no/wp/2004/12/09/log4j-and-the-mapped-diagnostic-context 3) Code Sample at : http://www.rtner.de/software/MDCUserServletFilter.html regards,

Why isnt Logger serializable?

2006-10-30 Thread jaikiran pai
Hi, Why isnt the Logger class serializable? We are using log4j in our web application which involves EJBs. When objects containing the log4j's logger are passed as parameters to these beans, we get a NonSerializable exception. Ofcourse, we can make the logger transient to avoid this, but was cu

Re: no output

2007-02-06 Thread jaikiran pai
I guess it should be: log4j.logger.org.springframework=OFF -Jaikiran - Original Message From: James Stauffer <[EMAIL PROTECTED]> To: Log4J Users List Sent: Tuesday, 6 February, 2007 10:21:43 PM Subject: Re: no output That should work (or something similar). Try setting it to fatal

SMTPAppender ignores Threshold value

2007-07-04 Thread jaikiran pai
Recently i saw a post on one of the forums where a user complained that the SMTPAppender does not take into account the Threshold value that is specified in the configuration. By default, the appender logs only events which have a level eqaul to or higher than ERROR. Here's one post in this mai

Re: SMTPAppender ignores Threshold value

2007-07-04 Thread jaikiran pai
>> later. Sure, no problem. Let me know whenever you get some spare time. -Jaikiran - Original Message From: Curt Arnold <[EMAIL PROTECTED]> To: Log4J Users List Sent: Thursday, 5 July, 2007 1:52:00 AM Subject: Re: SMTPAppender ignores Threshold value On Jul 4, 200

Re: AW: SMTPAppender ignores Threshold value

2007-07-05 Thread jaikiran pai
As Patrick mentioned, the code to implement this is really trivial with getters and setters. The whole point behind trying to have this TriggerLevel is, currently the TriggeringEventEvaluator does nothing other than comparing the logging event level with some threshold (currently ERROR). Users a