java org.apache.log4j.performance.Logging Undeclared prefix: "log4j:configuration"

2001-06-12 Thread Liang Sun
Hi, I tried to run java org.apache.log4j.performance.Logging with sample1.xml in the log4j 1.1.2 bundle but got this error. If I change the line to I'm able to run the test with a few warning. I've checked the local copy of log4j.dtd and it looks fine, no typo bug like "logj:configuration". I'v

Help needed : Log4J with servlets

2001-06-12 Thread Amit Vaidya
Hi, I'm trying to use log4J with servlets (running on weblogic) When I try to create a category instance inside my servlet, -- Category cat = Category.getInstance(NameOfTheServlet.class); -- This causes internal server error. What exactly could be the problem? I've import

Re: JSR47 Critique

2001-06-12 Thread Peter Donald
At 01:37 AM 6/13/01 +0200, Ceki Gülcü wrote: > >Greetings, > >Here is a written critique of JSR47, the logging API shipped with >JDK 1.4: > > http://jakarta.apache.org/log4j/docs/critique.html > >If you agree with its contents, then you are encouraged to send a >personalized request to I read t

Re: JSR47 Critique

2001-06-12 Thread Ceki Gülcü
Hello Chris, They could at the least change the way parents and children loggers interact. This is an implementation detail that does not affect the public API of JSR47. If they cannot accept input from the public, then what's the point of going through the act? Cheers, Ceki At 20:04 12.

Re: JSR47 Critique

2001-06-12 Thread Chris_Barlock
I don't think so. If Sun is going to ship JSR47 with JDK 1.4, they have to complete their test cycle. They won't accept anything but minor changes at this point. Once that's done, I'd guess that a major change (like changing from the JSR to log4j) will never happen. Chris Tivoli Systems Dept

Re: JSR47 Critique

2001-06-12 Thread Ceki Gülcü
Hi Pier, JSR47 is still in the public-review stage. Doesn't that mean that officially alterations are still possible? Cheers, Ceki At 00:43 13.06.2001 +0100, Pier P. Fumagalli wrote: >Ceki Gülcü at [EMAIL PROTECTED] wrote: >> >> Greetings, >> >> Here is a written critique of JSR47, the loggi

Re: JSR47 Critique

2001-06-12 Thread Pier P. Fumagalli
Ceki Gülcü at [EMAIL PROTECTED] wrote: > > Greetings, > > Here is a written critique of JSR47, the logging API shipped with > JDK 1.4: > > http://jakarta.apache.org/log4j/docs/critique.html > > If you agree with its contents, then you are encouraged to send a > personalized request to > > [EM

JSR47 Critique

2001-06-12 Thread Ceki Gülcü
Greetings, Here is a written critique of JSR47, the logging API shipped with JDK 1.4: http://jakarta.apache.org/log4j/docs/critique.html If you agree with its contents, then you are encouraged to send a personalized request to [EMAIL PROTECTED] asking them to adopt log4j as the logging

Re: while we are talking about NDC

2001-06-12 Thread Scott M Stark
The only difference between InheritableThreadLocal and ThreadLocal occurs when the thread local variable is initialized. Accessing/setting the value is the same in both cases. Here is a simple example: public final class SecurityAssociation { private static ThreadLocal thread_principal = new

RE: Comments on JSR47

2001-06-12 Thread David Duddleston
> At 08:33 PM 6/11/2001 Greg Davis wrote: > >I've noticed an incredible amount of inertia from people who > don't know a lot > >about logging but know they need it. The comments usually go > something like: > > > >"Why should I use when there is a > > logging package in JDK1.4". >

Re: Comments on JSR47

2001-06-12 Thread L. Scott Emmons
At 08:33 PM 6/11/2001 Greg Davis wrote: >I've noticed an incredible amount of inertia from people who don't know a lot >about logging but know they need it. The comments usually go something like: > >"Why should I use when there is a > logging package in JDK1.4". I've had to deal a

log4j with JMS

2001-06-12 Thread Jamie Tsao
Title: log4j with JMS Hi, I've written a JMSQueueAppender that basically writes to a JMS queue (very similar to the existing JMSAppender which writes to a JMS Topic).  My question is :  Each time a log request comes through, will new connection, session, and sender objects be created each ti

STMPAppende.BufferSize to control logging events per e-mail?

2001-06-12 Thread Renaud Waldura
Dear Log4j Users, I was hoping the BufferSize property of the SMTPAppender would control the number of logging events sent in one e-mail message. As quoted from the Javadocs: "The number of logging events delivered in this e-mail depend on the value of BufferSize option". But it doesn't seem t

RE: while we are talking about NDC

2001-06-12 Thread Seemantini Godbole
Anders, Thanks for pointing out. Yes, that is basically the same idea. I like Ceki's idea of using InheritableThreadLocal better. However, does anybody have any example code showing some usage. I tried to read ThreadLocal as well, and have not completely grasped the concept. I also like Ceki's i

Re: while we are talking about NDC

2001-06-12 Thread Anders Kristensen
This is essentially the same idea that Ceki floated previsouly under the name "Mapped Diagnostic Context" -- a per-Thread String-to-String map: http://marc.theaimsgroup.com/?l=log4j-dev&m=98051571516266&w=2 It's a good idea but hasn't been implemented yet (to my knowledge). Cheers, Anders S

while we are talking about NDC

2001-06-12 Thread Seemantini Godbole
Hi all, For last couple of weeks I have been using log4j and is working very well for our logging needs. Ours is a typical J2EE architecture, with JSP, servlets, EJB combination. However, we need some client specific info such as the name of the user who logged in, client ip address, request ty

RE: NDC.remove / memory issues

2001-06-12 Thread Ceki Gülcü
John, My previous answer got sent before your whoops. Whoops. :-) At 15:51 12.06.2001 -0400, John Volkar wrote: >Whoops, > >Sorry but this got sent before I got Ceki's response. Thanks Ceki! (I thought it >looked like it should work!) > >Regards > >John Volkar > >-Original Message

RE: NDC.remove / memory issues

2001-06-12 Thread Ceki Gülcü
John, The NDC code is well tested. It should work all the time unless one *never* calls NDC.remove(). I'd be surprised to hear otherwise. Ceki At 15:48 12.06.2001 -0400, you wrote: >Hmm, > >We are preparing to do some preliminary load testing on our application here, and had >actually fig

RE: NDC.remove / memory issues

2001-06-12 Thread John Volkar
Whoops,   Sorry but this got sent before I got Ceki's response.  Thanks Ceki!  (I thought it looked like it should work!)   Regards   John Volkar   -Original Message-From: John Volkar [mailto:[EMAIL PROTECTED]]Sent: Tuesday, June 12, 2001 3:49 PMTo: LOG4J Users Mailing ListS

RE: NDC.remove / memory issues

2001-06-12 Thread John Volkar
Hmm,   We are preparing to do some preliminary load testing on our application here, and had actually figured on relying on the lazy NDC.remove() behaviour.  (We figured that at least initially it should be good enough.)   Does it seem to not work 1)at all, or 2)poorly, or what?    I've lo

Re: NDC.remove / memory issues

2001-06-12 Thread Ceki Gülcü
At 12:37 12.06.2001 -0500, Wes wrote: >We just began stress testing our application, and found memory leaks. Eventually, I >isolated the leak to the NDC push/pop that we were doing in each thread that was >created. Then, after looking more carefully at the NDC class documentation, I saw >the

Re: Comments on JSR47

2001-06-12 Thread Greg Davis
Ceki Gülcü wrote: > > Geoff, > > My first and foremost criticism on the JSR47 API is the lack of any > provision for pluggability. The LogManger can be set at application > initialization time but not the type (class) of the Logger to be used. My understanding here is that the lead expert fo

NDC.remove / memory issues

2001-06-12 Thread Wes
We just began stress testing our application, and found memory leaks.  Eventually, I isolated the leak to the NDC push/pop that we were doing in each thread that was created.  Then, after looking more carefully at the NDC class documentation, I saw the following regarding the remove method:

Re: Pleaseeeeeeeee Help: SyslogAppender issue

2001-06-12 Thread Ceki Gülcü
At 09:22 12.06.2001 -0700, Shelly Dhiman wrote: >I want to send the log to Syslog so in my properties file i'm using > >log4j.appender.A1=org.apache.log4j.net.SyslogAppender >log4j.appender.A1.facility=LOG_LOCAL7 > >I can't see any log in any of the files >Could you plaese tell me what am i miss

Pleaseeeeeeeee Help: SyslogAppender issue

2001-06-12 Thread Shelly Dhiman
I want to send the log to Syslog so in my properties file i'm using log4j.appender.A1=org.apache.log4j.net.SyslogAppender log4j.appender.A1.facility=LOG_LOCAL7 I can't see any log in any of the files Could you plaese tell me what am i missing here Shelly -

RE: SocketAppender

2001-06-12 Thread Seemantini Godbole
Create a file named (ip address.lcf, i.e., 192.216.253.116.lcf. This is the host that generated the log message and sent to SocketAppender) in a directory on a machine where SocketServer is running. This file can contain all the config info. IMHO, this is a good way as you can change the config wi

SocketAppender

2001-06-12 Thread Atte A
Hi all! I want to use the SocketAppender (because of EJB and avoiding java.io calling). I also want to use org.apache.log4j.net.SocketServer to listen to messages. I want to log to two or more different files. Where do I put the info about destination files, maxfile size, MaxBackupIndex, Patt

catching exceptions ??

2001-06-12 Thread Eddie
The "PropertyConfigurator.configur()" method doesn't throw an exception and is of type void, so how do I know that no error occurred ?? That is, I don't wanne continue in my program if this goes wrong but can't catch this ?? Eddie ---

Using Log4J with servlets

2001-06-12 Thread Amit Vaidya
Hi, I've installed Log4J on my machine and was able to use it successfully with simple java programs using simple (txt) and XML based config files. I would like to know how Log4J is used with Servlets. A sample code would be of great help. Thanks & regards, Amit ---

log4j & EJB

2001-06-12 Thread Claudio D'Angelo
Hi to all, can anybody tell me if log4j if compatible with EJB Specifics (not thread, not call to java.io) Thanks a lot -- Claudio D'Angelo Software Consultant ObjectWay S.p.A. Via G.A. Boltraffio 7 20159 Milano (MI) http://www.objectway.it [EMAIL PROTECTED] Cell.:348-3033663 Numero Ver

Re: Flushing log messages

2001-06-12 Thread Ceki Gülcü
Thomas, By default *most* log4j appenders flush immediately. In particular, the WriterAppender and its descendants flush an incoming LoggingEvent immediately. As for the immediateFlush property mentioned by Steffen, it is set to true by default. The immediate flush behavior can be overridde

RE: different log files for different users on UNIX

2001-06-12 Thread Ceki Gülcü
Thilo, Steffen, I strongly discourage you from creating a distinct category for every user. There is a better way. See my previous mail on the same subject. Ceki At 11:03 12.06.2001 +0200, Thilo Schottelius wrote: >Dear Steffen, > >one solution would be to create a category for every user: >

Re: different log files for different users on UNIX

2001-06-12 Thread Ceki Gülcü
Steffen, Log4j configurators support variable substitution. Such that user=foo log4j.appender.A1.file=/export/home/${user}/logfile.log will be expanded to log4j.appender.A1.file=/export/home/foo/logfile.log Similarly, the system property "user" will be expanded. Let me know if this does not

RE: Flushing log messages

2001-06-12 Thread Steffen Schlachter
Hi Thomas, have you tried the immediateFlush option? See http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/WriterAppender.htm l#immediateFlush Steffen -Original Message- From: Thomas Tuft Muller [mailto:[EMAIL PROTECTED]] Sent: 12 June 2001 09:58 To: LOG4J Users Mailing Lis

RE: different log files for different users on UNIX

2001-06-12 Thread Thilo Schottelius
Dear Steffen, one solution would be to create a category for every user: String user="xyz" myCat=Category.getInstance("myClass"+user); Then you can add the file appender for this category concerning to the users home directory. You may receive the user name from your servlet or via JAVA call:

Flushing log messages

2001-06-12 Thread Thomas Tuft Muller
Hi, I've noticed that log-entries is 'hanging' somewhere during tailing of a log-file. Don't know if it's the internals of log4j or a buffered stream. Is it possible to flush pending log messages, i.e. force them to be written to the prevailing appender(s). -- Thomas **

different log files for different users on UNIX

2001-06-12 Thread Steffen Schlachter
Hi!   We are using log4j with Tomcat. We are currently using multiple instances of Tomcat on one UNIX box with one properties file. The problem is that we want to log the output separately for every user in his own directory. So the question is:   Is there anything like   log4j.appender.A1.