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

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

Re: SMTPAppender ignores Threshold value

2007-07-04 Thread jaikiran pai
, jaikiran pai wrote: 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

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

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,

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 -DmyWebApp=c:/somepath . You will have to check the bat file which

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

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 I

Re: TimeStamp for the backupfiles

2006-07-13 Thread jaikiran pai
Try this out: appender name=MY_LOG class=org.apache.log4j.DailyRollingFileAppender param name=File value=D:/mylog.log/ param name=Append value=false/ !-- Rollover at midnight each day -- param name=DatePattern value=apos;.apos;-MM-dd/ layout

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) {

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: ?xml version=1.0 encoding=UTF-8? !DOCTYPE

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
]; 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 [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 04, 2006 12:03 PM

RE: Get all appenders configured in log4j - Possible?

2006-07-04 Thread jaikiran pai
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: Tuesday, July 04, 2006 2:39 PM

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

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 multiple files as configuration

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