You might want to have a look at:

http://jakarta.apache.org/log4j/docs/manual/manual.html#defaultInit

At 09:29 12.11.2001 +0000, Alan Pearlman Spencer wrote:
>Hi,
>A fellow TCD maths grad...
>You should use (I think) 
>-Dlog4j.configurator= a class name for a configurator
>(org.apache.log4j.PropertyConfigurator 
>in your case I think)
>and
>-Dlog4j.properties= file name as a java resource
>(ie/tcd/maths/log4j.properties if it is
>in the ie.tcd.maths package).
>
>Hope this helps.
>Alan.
>
>-----Original Message-----
>From: James Lawless [mailto:[EMAIL PROTECTED]]
>Sent: 08 November 2001 21:12
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]; James Lawless
>Subject: WL 6.1 log4j.properties
>
>
>Hello all,
>
>I began setting up log4j today to run with an application I am
>developing
>on BEA WebLogic App Server 6.1
>
>I had a little bit of trouble getting to grip with log4j concepts at the
>start as I didn't realise many of the classes and methods in the API are
>taken care of for you via the configuration file. I was trying to
>programatically set all my options whilst also struggling with a
>propreties file. Eventually however I worked it out and seem to be on
>the
>road to happy logging now :-)
>
>The only real problem I still have is pointing the App Server at the
>correct config file dynamically. i can get it to work by using a
>PropertyConfigurator explicitly in the code to configure and pas in the
>filename here.
>In the documentation, it says that for Tomcat, config files path
>calculations are performed from the class root., i.e. web-inf/classes
>
>I tried adding a system property -Dlog4j.configurator=logging.lcf to
>the WebLogic startup script with logging.lcf in the web-inf/classes
> directory and got no joy.
>
>I then tried to use the default mechanism and saved the file as
>log4j.properties and placed this in the web-inf/classes directory. this
>time I got an error message telling me that class [log4j.properties]
>could
>not be instantiated??
>
>The only way I could get it to work was by explicitly setting the config
>file programatically. I presume that what works for Tomcat should also
>work for WebLogic, i.e. the approach above should work in theory?
>
>The other issue I had was that I set a String variable as the argument
>to
>Category.getInstance("mycat"); I then had to explicitly set the Appender
>for mycat in the config file, the root category settings wouldn't apply.
>Apparently if I had used Class.forName() instead, the root category
>would
>have been sufficient to use in aplying settings, is this true?
>
>Any light that anyone could shed on any of these issues would be greatly
>appreciated,
>
>Thanks in advance,
>
>James
>
>--------------------------------------------------------------------
>James Lawless B.A., M.Sc.       Graduate Student, School of Maths, TCD
>086 834 8869                    www.maths.tcd.ie/~lawless
>---------------------------------------------------------------------
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


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

Reply via email to