This is one possible scenario - but as Jeff says it's server specific
logging (not application specific) - which can often be non-optimal.

We have a document coming out on this (check http://kb.atlassian.com) soon,
but until it's finished here's what we usually do:

- use the latest log4j from CVS (which has the capability to define which is
the default log loading class - there is now one which loads log4j.xml from
classpath, and watches it) - I believe it's done via system properties
(selecting automated file loader and watch time)
- add a <library path="config" /> to your orion-application.xml for each
application
- add config/log4j.xml to your application

You're done! this means you now have :
- automatic log configuration (no more need for servlet listeners,
application clients or servlets to configure logging!)
- dynamic logging (you can just change the log4j.xml file and your changes
are picked up without redeployment)
- logging _per application_ (rather than per server)

As I said, see if the above directions work for you and please email me off
list if they don't (so we can adjust the document in progress).

"Watch this space" for the doco coming soon ;)

Hope this helps!
Mike

Mike Cannon-Brookes
[EMAIL PROTECTED]

Atlassian :: www.atlassian.com
    Supporting YOUR world


Now just configure log4j.xml

On 19/1/02 4:40 AM, "Jeff Schnitzer" ([EMAIL PROTECTED]) penned the words:

> I put the log4j.jar in orion's lib directory, and use
> -Dlog4j.configuration=file:path/to/log4j.properties
> to initialize log4j.  I'm pretty happy with this approach.  I control
> logging on a server-wide basis, so I can use the same ear file for both
> testing and deployment.
> 
> Jeff Schnitzer
> [EMAIL PROTECTED]
> 
>> -----Original Message-----
>> From: Alex Paransky [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, January 18, 2002 5:35 PM
>> To: Orion-Interest
>> Subject: FW: Integrating LOG4J into Orion...
>> 
>> One more time, the last one did not show up....
>> 
>> -----Original Message-----
>> From: Alex Paransky [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, January 17, 2002 11:09 AM
>> To: Orion-Interest
>> Subject: Integrating LOG4J into Orion...
>> 
>> 
>> I have a full EJB/JSP application running with Orion.  Is there a
>> preferred
>> method of initializing LOG4J in this situation?
>> 
>> Looking at the LOG4J documentation, they mention using a startup
> servlet
>> to
>> do the initialization.  I am concerned as to how this would work with
> the
>> CLASSLOADER hierarchy.  If I initialize my LOG4J at the servlet (WEB)
>> layer,
>> will the EJB's be able to see the initialized LOG4J or will they
> attempt
>> to
>> re-initialize due to the different classloader?
>> 
>> Thanks.
>> -AP_
>> 
> 


Reply via email to