could you post that? :-)

Questions:

if you want a specific servlet container to load up a DOMConfigurator that will tell 
log4j how to log things, what do you need to do?

ie could you just make a singleton or something that is loaded when a servlet "runs" 
and that can hold the log4j configuration stuff.  (ie in normal apps you make the 
DOMConfigurator in the main method.  in a servlet container there really is no main 
per say.  where do you stick the call to create the DOMConfigurator )


and all of the  cat.info("foo");  will use that Configurator.

certainly all of the paths for where the logs are stored will be relative to some 
variable (contatiner, container runner, etc etc).  but that is semi secondary to 
getting a set of servlets up and running using your Appender Config.


it should all jsut work right?  Also where do you stick your config file? the WEB-INF/ 
 WEB_INF/classes   lib/   :-)



thanks!!  tonight is the night to servlet log with log4j! and once that occurs the 
world will be a better place!!!

msew



---------- Original Message ----------------------------------
From: Robert Burrell Donkin <[EMAIL PROTECTED]>
Reply-To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
Date: Tue, 13 Mar 2001 00:25:47 +0000

>Thai Thanh Ha wrote:
>
>>   Hi all!I have a problem with my servlet. I want to use
>> log4j.properties to configure Log4J. I have put log4j.properties in
>> /WEB-INF/classes. I think that Log4J will look for log4j.properties in
>> the classpath if I don't use BasicConfigurator.configure() . But Log4J
>> couldn't find log4j.properties.  What's wrong? Please help me!
>
>what container are you using? your servlet doesn't actually run like it
>would in a free environment.
>if you are using tomcat 4 i do have a very rough servlet listener which
>loads log4j from a path relative to you context. i can post it to the
>list if it's any use.
>if you want to roll your own, i started by using a PropertyConfigurator
>and the ServletContext to find an absolute path from a location relative
>to your web app.
>
>- robert
>
>
>---------------------------------------------------------------------
>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