Dear Jamie,
-----Original Message-----
From: Jamie Tsao [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 12. Juni 2001 01:06
To: [EMAIL PROTECTED]
Subject: Simple question

Hi, 
I'm a new user to log4j, and I had a simple question.  When I call
PropertyConfigurator.configure(filename) to configure log4j based on a
properties file, how does log4j know which logging "instance" to configure ?
I guess I'm a little confused about why you shoudn't have to pass a root
Category instance to that method.  Does this mean there can only be one
log4j instance per JVM ?  I'm not sure why I would want to have two log4j
instances, but I'm asking out of curiosity.  What if I call
PropertyConfigurator.configure(), but I never even have any Category
instances defined ?
Thanks, 
Jamie 
>>> I would say, it is not quite ok to speek about an instance of log4j. The
main thing is that you deal with categories. You receive the categories by
calling the static method getInstance() of the class Category. The static
method makes the instance of category somewhat "global" (singleton?).

But for you purpose, you may create two hierachies. As written in the JAVA
Doc of the class Hierarchy:
-----------
However, if you are in an environment where multiple applications run in the
same VM, then read on. 
-----------

this class may help you.

Thilo

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

Reply via email to