Re: Log4j config problem

2005-07-14 Thread Dariusz
Thanks James. It worked like a charm. Can't believe I spent so much time trying to figure it out and you solved it in one sentence. Thanks again. --Dariusz. James Stauffer wrote: Set additivity to false for your program's logger. On 7/14/05, Dariusz <[EMAIL PROTECTED]> wrote: Hi, I

Re: SMTPAppender

2005-07-14 Thread Paul Smith
It's useful when you want to know via email when a particular event happened (the triggering event, usually an ERROR of some sort) along with context logging lines before that triggering event to help you understand how the code came to that trigger point (hence a buffer size for this appen

RE: Log4J: System.out and System.err

2005-07-14 Thread Mike Wannamaker
I don't want to send to, I want to capture. We have applications that are writing to System.out and System.err and I want to capture those and log them to a Logger. What I've done is this: private static void setupLoggerOutputStreams() { ComponentLogger logger = n

SMTPAppender

2005-07-14 Thread Rusty Wright
I went and looked in the list archives and someone pointed out that SMTPAppender is set up to only log error level stuff. The default TriggeringEventEvaluator it's using only triggers on error level. So I wrote my own TriggeringEventEvaluator that always returns true and now it logs everythin

Re: Log4J: System.out and System.err

2005-07-14 Thread Javier Gonzalez
Don't know about capturing System.out or System.err, but the ConsoleAppender can be created with the property Target set to System.out or System.err for logging to the desired stream -- Javier Gonzalez Nicolini - To unsubscribe

Log4J: System.out and System.err

2005-07-14 Thread Mike Wannamaker
Is there a way to tell log4J to capture System.out or System.err? Also it looks like log4j at certain levels of logging also logs to the System.err/System.out can anyone confirm this? Possibly through something called a QuietWriter? TIA --ekiM ---

Re: Log4j config problem

2005-07-14 Thread James Stauffer
Set additivity to false for your program's logger. On 7/14/05, Dariusz <[EMAIL PROTECTED]> wrote: > Hi, > > I am migrating an application from JDK logger to Log4j 1.2.9 (using > Tomcat 5.0.28) and almost got it to work, except for one remaining > issue. Hopefully someone will be able to give

SMTPAppender help needed

2005-07-14 Thread Rusty Wright
I'm trying to use SMTPAppender but it's not sending me the email. I figured out that I need to add Sun's jaf.jar and activation.jar, so now it runs without any error. This is a standalone program that's packaged as a jar file. My smtp server is postfix. The CONS and FILE appenders are worki

V1.2.8: RollingFileAppender "missing" log file numbers?

2005-07-14 Thread Karr, David
We're seeing an odd problem with the RollingFileAppender, perhaps when we're pushing it pretty hard. At the end of the day sometimes we look at the directory where the log files are stored, and it appears that some of the log file numbers are missing. It isn't just that it wrote it out with the w

RE: Reloading the config file

2005-07-14 Thread Mark Womack
You are correct. It is only a file watcher, not a url watcher. v1.3 will have a much richer set of functionality that can watch a file, url, or a socket for updated configuration data and it will also support any Configurator. -Mark > -Original Message- > From: [EMAIL PROTECTED] > [mailt

Log4j config problem

2005-07-14 Thread Dariusz
Hi, I am migrating an application from JDK logger to Log4j 1.2.9 (using Tomcat 5.0.28) and almost got it to work, except for one remaining issue. Hopefully someone will be able to give me some tips on how to solve it. What I want to have is a separate log file for all Tomcat output (log4j.log

Reloading the config file

2005-07-14 Thread log4jusers . ml . trace
The log4j Configurator class has a method configureAndWatch(String configFilename, long delay) which can check that a config file has changed and, if so, reload it (delay being the reload interval). This is a very convenient method. However, it seems that this method can only be applied to local

Re: Appenders at different log levels for a single logger

2005-07-14 Thread Rob van der Leek
On Thu (Jul 14) at 09:34, Philip Kaplan wrote: > Your second rootLogger entry is overriding your first. Keep the root > logger set at debug and place both appenders there...and then set the > threshold values on each of the loggers to DEBUG and ERROR > respectively. > > log4j.appender.logfile.Thr

Re: Appenders at different log levels for a single logger

2005-07-14 Thread Philip Kaplan
Your second rootLogger entry is overriding your first. Keep the root logger set at debug and place both appenders there...and then set the threshold values on each of the loggers to DEBUG and ERROR respectively. log4j.appender.logfile.Threshold=DEBUG log4j.appender.errorlog.Threshold=ERROR pK.

Appenders at different log levels for a single logger

2005-07-14 Thread Rob van der Leek
Hi list, How can I define appenders at different log levels for the same logger? For instance, what if I want to route all ERROR-level messages to an error logfile and all other messages to a different logfile. I'd hoped something like this would be possible: log4j.rootLogger=DEBUG, logfile l

RE: Serialization problem?

2005-07-14 Thread Caroline Wood
Ah, that makes sense now, thanks. Would the best strategy for passing an object via the message be to override the toString() method to marshal the object to an xml string? Or is there a better way of approaching this? Many thanks, Caroline. -Original Message- From: Tom Drake [mailto:[EM