Thanks Ceki,

I have finally been able to get this to work be not using an absolute path
and trying different config files.  This leads to another question, why is
it when I identify the rootCategory=DEBUG, SDTDOUT I get no messages, while
when I make in rootCategory= ,A1, A2 the messages work perfectly.  I read
the manual but I do not understand why this happens could you clarify for
me.

Thanks

Michael Brooke

-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 2:56 PM
To: LOG4J Users Mailing List
Subject: Re: I am new and I am lost ...


At 20:32 28.03.2001 +0100, Robert Burrell Donkin wrote:
>"Michael A. Brooke" wrote:
>
>> Hi,
>>
>> I have managed to use the BasicConfigurator and see my debug messages.
>> I am trying to change to the PropertyConfigurator and use the config
>> file but I am unable to read the file I set up.
>
>see post on absolute paths
>
>> Where should I put it?
>
>this is actually a good question
>
>> I also have been reading some links between log4j and tomcat.  Is there
>> a complete example or write up of how these two work together.  My
>> application is written using tomcat and mysql, any help and suggestions
>> would be very much appreciated.

Tomcat 3.x does not use log4j. However, as far as I know, Tomcat 4.0, or
more precisely Catalina, the Servlet container for Servlet API Specification
2.3, has opted to use log4j internally. I'll double check this shortly.

The Tomcat API provides hooks to use different logging package then the one
provided by tomcat internally. I have not used this extension facility
extensions myself. However, I intend to study it in the near future.

Let me also add that I am in midst of writing a web application specifically
designed to view log output generated by clients using log4j. This web
application will be a paying extension to log4j.

>i believe that the link is that log4j is being used internally by tomcat
>for logging (maybe somebody who knows more would like to jump in here)
>rather than directly supporting logging and debugging webapps being run by
>tomcat (at the moment).
>
>IMHO using log4j to debug webapps is a good idea, but does require
>tweaks/extensions to log4j and also raises general webapp design issues. i
>don't know if there is a general consensus about 'the way to do it' (maybe
>somebody how know more would like to jump in here)...

Actually, I have been using log4j out of the box in my web applications. One
has to follow the servlet life cycle, in init() to intialize log4j and in
destroy() to close appenders with Category.shutdown(). Logging to the
console also works without any special steps. I am using Tomcat 3.2.
Regards, Ceki


--
Ceki Gülcü          Web: http://qos.ch
                email: [EMAIL PROTECTED] (preferred)
                         [EMAIL PROTECTED]

I hope to see you at my ApacheCon 2001 presentation
entitled "Log4j, A Logging Package for Java".

See http://ApacheCon.Com/2001/US/ for more details.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to