Log4j Configuration with Servlet

2002-12-12 Thread [EMAIL PROTECTED]
Hi all, Does anybody know if there is any particular care to let Log4j log inside a servlet? By now, I've just added the log4j.properties file in WEB-INF/classes (under Tomcat) of my application, as suggested in the short-manual (http://jakarta.apache.org/log4j/docs/manual.html). Am I

AW: Log4j Configuration with Servlet

2002-12-12 Thread Lenharcik, Juraj
Hi, - create a servlet with an init method, which configures your log4j properties. - WEB-INF/webx.ml create an entry to init the servlet while server start. One property of this entry is the path to your log4j config-file (if your file is in /classes you can use reflection

RE: Change properties at runtime

2002-12-12 Thread Kohinoor Lal Verma (EHS)
Thank Shapira, Canyou tell me some properties that are nor reset-able ??? Rgds Kohinoo - Kohinoor Lal Verma, Senior Systems Engineer, Ericsson Mobile Commerce Platform, New Delhi, India. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]

RE: Log4j Configuration with Servlet

2002-12-12 Thread Daniel Serodio
I suggest adding this to the FAQ. On Thu, 2002-12-12 at 11:49, Shapira, Yoav wrote: Howdy, While Mr. (?) Lenharcik's suggestion will work, I'd suggest doing it slightly differently: use a ServletContextListener and initialize log4j in the contextInitialized() method. That will get called

RE: Log4j Configuration with Servlet

2002-12-12 Thread Shapira, Yoav
Howdy, Mr is right; But only if you are using the servlet api 2.3 this would be work. My solution was done before... ;-) That's true. My solution requires servlet API 2.3 or later, and I should've mentioned that. In fact, until v2.3 came out, I had a load-on-startup servlet as well. The only

RE: using 2 priorities in one category

2002-12-12 Thread Thimo König
Try like this: #SocketAppender log4j.appender.A1.Threshold=DEBUG #SMTPAppender log4j.appender.A2.Threshold=ERROR -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]

Need help with JBoss log files

2002-12-12 Thread Chris Yoerg
I'm creating a custom log file within JBoss using a log4j.xml config file. I've successfully made the custom logger track actions of users within the application in question, utilizing the following configuration information(I'm getting the proper info). I want the appender to create a new

RE: Need help with JBoss log files

2002-12-12 Thread Shapira, Yoav
Hi, You need to use a DailyRollingFileAppender. You'll get the rollover and file naming (no overwriting). See the javadoc for org.apache.log4j.DailyRollingFileAppender and examples in the mailing list archives for this list. Unless I completely misunderstood your question? Yoav Shapira

RE: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
Jacob Kjome has pointed us at his log4j init servlet in the past. It is really quite full featured and definitely worth taking a look. http://marc.theaimsgroup.com/?l=log4j-devm=103725695000410w=2 Yoav's point about using the context listeners (requiring Servlet 2.3) is very valid, and going

Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Jacob Kjome
Hello Mark, See comments below... Thursday, December 12, 2002, 12:47:53 PM, you wrote: MW Jacob Kjome has pointed us at his log4j init servlet in the past. It is MW really quite full featured and definitely worth taking a look. MW http://marc.theaimsgroup.com/?l=log4j-devm=103725695000410w=2

Problem Fixed, Thanks to You

2002-12-12 Thread Chris Yoerg
Thank you very much, it's working nicely now. My log4j.xml appender def'n now looks like. !-- Custom logging for patent prior art database changes-- appender name=PRIORART class=org.jboss.logging.appender.DailyRollingFileAppender param name=File

RE: Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
Howdy Jacob, Actually, If you look in my post, I mention more than just the Log4jInit servlet. I also mention a servlet context listener (SCL) called Log4jApplicationWatch. I actually use that currently to do cleanup such as shutting down loggers and appenders of the currently used

RE: Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
Actually, the main thing I'd propose is having Log4jCRS (Log4j Contextual Repository Selector) be included with the Log4j distribution. The reasons for this are described in my post that Mark linked to above. I know this is not a vote, but +1 on that. As part of the contrib tree, not

Re[4]: Log4j Configuration with Servlet

2002-12-12 Thread Jacob Kjome
MW Jacob, do you think you can make an official apache submission (with all MW the correct apache headers, etc)? Is there some place that describes all that, or should I just copy the license from some other Log4j file and paste it into Log4jCRS? Jake -- To unsubscribe, e-mail: mailto:[EMAIL

Catching uncaught exceptions

2002-12-12 Thread Thomas Saxtoft [EMAIL PROTECTED]
This is really two problems, but since it is concerned with logging I give you both. We have created a Java client, and now we wish to log all uncaught exceptions. As it is now exceptions thrown in threads and other uncaught exceptions are written to standard error out I believe. I think that I

Re[6]: Log4j Configuration with Servlet

2002-12-12 Thread Jacob Kjome
Hello Mark, One more question. What package might it exist in? My best guess would be org.apache.log4j.spi? I'll assume that unless you tell me differently. Jake Thursday, December 12, 2002, 3:53:38 PM, you wrote: MW I'm sure there is, but I think any log4j source file will provide enough

RE: Catching uncaught exceptions

2002-12-12 Thread Cakalic, James
Use Jim Moore's LoggingOutputStream. You'll find it in his log4j contrib directory in the release. The javadoc describes how to use it to redirect System.out and System.err. Best regards, Jim Cakalic -Original Message- From: Thomas Saxtoft [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Re[6]: Log4j Configuration with Servlet

2002-12-12 Thread Jacob Kjome
Hello Mark, Here it is (zip file attached). I set the package as org.apache.log4j.spi and commented out the imports from that package. If it is going to a separate package, feel free to modify it. Jake Thursday, December 12, 2002, 3:53:38 PM, you wrote: MW I'm sure there is, but I think any

permissions in FileAppender

2002-12-12 Thread Daniel . Hannum
If I send logs from one app to another over SocketAppender and the listener writes to a FileAppender, am I correct that write permissions are dependent only on the user who ran the server, and NOT the user who generated the log? Put another way, Log4j doesn't care about userid's and passwords?

RE: Re[6]: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
Thanks! If you had to rename this class, would ClassLoaderRepositorySelector or ClassLoaderSelector be okay? Since it will in log4j, I don't think the class name needs to start with Log4j... -Mark -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: Thursday,

Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Ceki Gülcü
At 15:05 12.12.2002 -0600, Jacob Kjome wrote: Hello Mark, MW I would also like to say that I have proposed that we include servlet/web MW application support in v1.3 of log4j. This would include an init servlet, MW context listeners, configuration via a servlet, etc. Jacob has proposed to MW

RE: Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
One possible one-shot-kill-all-birds solution is to use the JNDI space. See the updated version of http://www.qos.ch/logging/sc.html (in particular JNDIRS). What do you think? I also suggested the JNDI solution in commons-dev in a somewhat different context. It seemed to be well received.

RE: Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Ceki Gülcü
At 15:54 12.12.2002 -0800, Mark Womack wrote: One possible one-shot-kill-all-birds solution is to use the JNDI space. See the updated version of http://www.qos.ch/logging/sc.html (in particular JNDIRS). What do you think? I also suggested the JNDI solution in commons-dev in a somewhat

RE: Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Mark Womack
Yes, we can reasonably do that. However, I am unsure about the maturity of any of these approaches without proper testing/analysis. Consequently, we should include these selectors assuming that they are visibly marked as experimental. Their inclusion might spur Container developers to refine

Re[2]: Log4j Configuration with Servlet

2002-12-12 Thread Jacob Kjome
Hi Ceki, see comments inline below... At 12:45 AM 12/13/2002 +0100, you wrote: At 15:05 12.12.2002 -0600, Jacob Kjome wrote: Hello Mark, MW I would also like to say that I have proposed that we include servlet/web MW application support in v1.3 of log4j. This would include an init servlet,

RE: Resin with log4j (long)

2002-12-12 Thread Mark Womack
Yoav Jacob, Are you sure about that? Positive. The example in SRV 10.2.2 makes this clear. I've also inspected the code in tomcat and resin myself and they both implement the spec the same way. contextInitialized() get called when everything has gotten done initializing. That is,

Logging to a Servlet container's log files

2002-12-12 Thread Dave Johnson
I'm writing a chapter about debugging JSP applications and I want to over logging with Log4J. I understand how to configure Log4J in a web app, but I'm trying to understand the philosophy of using Log4J in a Servlet/JSP web appliction. It is my understanding, and my experience with at least one