RE: Integrating LOG4J into Orion...

2002-01-31 Thread Djemal, Guy (TWIi London)

Well I've followed all these instructions but have fallen over on a couple
of counts:

1- Using a BasicConfigurator, which is initialised within a singleton,
nothing is displayed, it's as if log4j has gobbled up all my messages :-(
2- If I try and use a DOMConfigurator it can't find the config file.

Help anyone?

Thanks,
Guy :-(

-Original Message-
From: Scott Farquhar [mailto:[EMAIL PROTECTED]]
Sent: 22 January 2002 01:28
To: Orion-Interest
Subject: Re: Integrating LOG4J into Orion...


Further to what Mike has said, I'll just give you a little update on the 
  status of the Log4j 1.2 release.

The 1.2 code base is largely different to the 1.1 base, and has features 
that when finished, will be useful for using in application servers, and 
make it a lot easier to configure.

The features that I talk about are:

- Different LogManagers.
This will allow Orion to provide a logmanager *per application*, or if 
it can't find one, use the default logmanager.  This means that you will 
be able to specify a configuration file per application, and not have to 
manually configure it.

- Configuration files will be reloaded
The watchers code is being rewritten.  When it is finished, you will 
most likely have code that allows you to configure how often the config 
files are reloaded (and stop / restart the watcher thread).

So what does this mean for you, if you are using log4j in your 
application now?

- Use the 1.2 code.  Although in alpha, it is quite stable.
- If you have specific requirements (apart from the above two), suggest 
them on the log4j email list, or email me with your suggestions.

Lastly - congratulations on using log4j.  Logging is very important in 
enterprise applications!

Cheers,
Scott

-- 
Scott Farquhar :: [EMAIL PROTECTED]

Atlassian :: http://www.atlassian.com
  Supporting YOUR J2EE World


Mike Cannon-Brookes wrote:

 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_


 
 
 






RE: Integrating LOG4J into Orion...

2002-01-21 Thread Geoff Soutter

It probably depends on how you have it configured. The main thing to
remember is that J2EE uses multiple classloaders and each classloader
can potentially have it's own version of a singleton.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of 
 Justin Crosbie
 Sent: Monday, 21 January, 2002 8:13 PM
 To: Orion-Interest
 Subject: RE: Integrating LOG4J into Orion...
 
 
 Hi,
 
 We have wrapped Log4J in a singleton, so the first call to it 
 initialises it. I'm not sure if this is a good idea or not 
 though, but we've had no problems so far. Any opinions?
 
 -Justin 
 
 -Original Message-
 From: Romen Law [mailto:[EMAIL PROTECTED]]
 Sent: 20 January 2002 23:05
 To: Orion-Interest
 Subject: Re: Integrating LOG4J into Orion...
 
 
 ello,
 
 What I did was to have a initialising SLSB and let the 
 startup servlet call it. It works for me.
 
 cheers
 romen
 
 - Original Message -
 From: Alex Paransky [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Saturday, January 19, 2002 12:34 PM
 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_
 
 
 
 
 





Re: Integrating LOG4J into Orion...

2002-01-21 Thread Scott Farquhar

Further to what Mike has said, I'll just give you a little update on the 
  status of the Log4j 1.2 release.

The 1.2 code base is largely different to the 1.1 base, and has features 
that when finished, will be useful for using in application servers, and 
make it a lot easier to configure.

The features that I talk about are:

- Different LogManagers.
This will allow Orion to provide a logmanager *per application*, or if 
it can't find one, use the default logmanager.  This means that you will 
be able to specify a configuration file per application, and not have to 
manually configure it.

- Configuration files will be reloaded
The watchers code is being rewritten.  When it is finished, you will 
most likely have code that allows you to configure how often the config 
files are reloaded (and stop / restart the watcher thread).

So what does this mean for you, if you are using log4j in your 
application now?

- Use the 1.2 code.  Although in alpha, it is quite stable.
- If you have specific requirements (apart from the above two), suggest 
them on the log4j email list, or email me with your suggestions.

Lastly - congratulations on using log4j.  Logging is very important in 
enterprise applications!

Cheers,
Scott

-- 
Scott Farquhar :: [EMAIL PROTECTED]

Atlassian :: http://www.atlassian.com
  Supporting YOUR J2EE World


Mike Cannon-Brookes wrote:

 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_


 
 
 






Re: Integrating LOG4J into Orion...

2002-01-20 Thread Romen Law

ello,

What I did was to have a initialising SLSB and let the startup servlet call
it. It works for me.

cheers
romen

- Original Message -
From: Alex Paransky [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Saturday, January 19, 2002 12:34 PM
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_








RE: Integrating LOG4J into Orion...

2002-01-19 Thread Jeff Schnitzer

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_
 





Re: Integrating LOG4J into Orion...

2002-01-19 Thread Mike Cannon-Brookes

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_