Re: Appender configuration changes unexpectedly at runtime

2005-12-02 Thread Jacob Kjome
I suspect utility code that is performing its own configuration of Log4j without your knowledge. Or, depending on where Log4j is, it might be another webapp which is configuring itself that is affecting your application. If Log4j.jar is in shared/lib or common/lib, and there is no log4j.jar

Re: log4j multithreading performance

2005-12-02 Thread Trenton D. Adams
I came to the conclusion that it wouldn't fix it. You can review the java memory model mailing list for today to find out why. Look for the "solution to double-check locking" thread. James Stauffer wrote: I have thought that pattern would fix the problem also but I have never seen anyone men

Appender configuration changes unexpectedly at runtime

2005-12-02 Thread Peter Krenesky
I'm working on a webapp using java 1.5 on tomcat5.0.28 that has some multithreaded processes that run behind the scenes. When the app is running log4j.properties is loaded and initially works correctly. After a few minutes (its varies) the configuration changes. The layout switches to the d

log4j release 1.3

2005-12-02 Thread Steve Pringle
Does anyone know when 1.3 will be available? At one point it was expected out this past October, but now there no mention of the release date... thanks, Steve Pringle

PropertyConfigurator, appenders attaching to root and multiple outputs at different levels...

2005-12-02 Thread Burton Strauss
(1.2.12) What I have is this log4j.properties: log4j.rootLogger=info,console,file log4j.logger.console=warn log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.SimpleLayout log4j.logger.file=info log4j.appender.file=org.apache.log4j.FileAppender

Re: log4j multithreading performance

2005-12-02 Thread James Stauffer
I have thought that pattern would fix the problem also but I have never seen anyone mention it before. On 12/2/05, Trenton D. Adams <[EMAIL PROTECTED]> wrote: > Actually, a co-worker and I just came up with a possible solution. > > public static Object getInstance() > { >if (instance == null)

Re: log4j multithreading performance

2005-12-02 Thread Curt Arnold
On Dec 2, 2005, at 6:44 AM, Endre Stølsvik wrote: log4j should -definately- be -extremely into- synchronization issues. I myself log -a whole lot-, and if I'm hit by synchs on every log even if the debug or trace is turned off, this will eat a -ton- of time. Remember that synching becomes

SMTPAppender

2005-12-02 Thread Steve Pruitt
All, It appears that the SMTPAppender has to be fully defined in the config file. The host, to, from must be set. I get a stack trace trying to create the appender and its complaining about a InternetAddress. I need to set those params at some point after the application is running. So, I must

Re: Tomcat WEBAPP: Ask for Knowledge: Catch all an APP writes to stdout (catalina.out)

2005-12-02 Thread Jacob Kjome
Quoting Alexander Rohde <[EMAIL PROTECTED]>: > Hello. > > I have several Tomcat webapps running on our server. > This webapps are writing all output to catalina.out. > I think they_re all firing to stdout. > Now, I try to catch that output and write it to an "per WEBAPP" file. > But, depending on

RE: log4j multithreading performance

2005-12-02 Thread Burton Strauss
That's the standard 'Singleton' pattern. If you follow all the stuff about Double-Checked locking, that's what they come up with too... -Burton -Original Message- From: Trenton D. Adams [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 1:12 PM To: Log4J Users List Subject:

Re: log4j multithreading performance

2005-12-02 Thread Chris Berry
We have recently had some nasty problems w/ log4j synchronization. This was laid out in a recent post to this list; "threading issue with log4j" on Nov 23, 2005 It is a problem w/ the 1.2.X code base, which synchronizes within the callAppenders method of Category. This is a fundamental class of lo

Re: log4j multithreading performance

2005-12-02 Thread Trenton D. Adams
Actually, a co-worker and I just came up with a possible solution. public static Object getInstance() { if (instance == null) createInstance(); return instance; } private static synchronized void createInstance() { if (instance == null) instance = new Object(); } So, we end up ha

Tomcat WEBAPP: Ask for Knowledge: Catch all an APP writes to stdout (catalina.out)

2005-12-02 Thread Alexander Rohde
Hello. I have several Tomcat webapps running on our server. This webapps are writing all output to catalina.out. I think they_re all firing to stdout. Now, I try to catch that output and write it to an "per WEBAPP" file. But, depending on the logging level, I only get much or less output from tom

RE: Silly ? - How do I figure out the name of the file the log is being written to?

2005-12-02 Thread Burton Strauss
Ah ... Light dawns... So (ripping the printlns out into methods) int countOfLoggers = 0; Enumeration loggers = LogManager.getLoggerRepository().getCurrentLoggers(); if(loggers != null){ while(loggers.hasMoreElements()){ Logger l = (Logger)loggers.nextElement(); i

Re: log4j multithreading performance

2005-12-02 Thread Endre Stølsvik
On Fri, 2 Dec 2005, Curt Arnold wrote: | | On Dec 2, 2005, at 12:19 AM, Trenton D. Adams wrote: | > | > Could the optimizer move the "instanceIndicator = 1" up one line? Perhaps by | > analyzing exactly what's happening it could, because it knows, or *thinks* | > it won't affect anything. | |