logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diamond, Josh M" <Josh_Diam...@rsco.com>
Subject RE: Need user name, hostname, etc. in log...
Date Mon, 05 Mar 2001 16:22:54 GMT

Agreed, the way to control the values is via AppServerCategoryFactory.  But
there is no control over the AppServerCategoryFactory constructor arguments
when using DOMConfigurator and PropertyConfigurator, and I cannot force the
use of any explicit configuration, because I have no control over main().

Josh Diamond

-----Original Message-----
From: Paul Glezen [mailto:pglezen@us.ibm.com]
Sent: Monday, March 05, 2001 10:33 AM
To: LOG4J Developers Mailing List
Subject: RE: Need user name, hostname, etc. in log...

Hi Josh,

By setting the hostname, server name, etc on the AppServerCategoryFactory,
you automatically have them set on the Category instances created by the
factory.  The getter/setter methods on the AppServerCategory class are only
there for special override purposes.  I've never used them myself.  In
fact, in my code, all references to AppServerCategory instances are of type
Category.  So my initialization code looks something like this at program

   AppServerCategoryFactory factory =
       new AppServerCategoryFactory("My Server", null, null);
   AppServerCategory.setFactory( factory );

   //  Run some configurator here.

   //  Then later in code where you need a reference to a
   //  category.

   Category myCat = AppServerCategory.getInstance("my.cat");

The instance of myCat will automatically be populated with the hostname and
server name set on the AppServerCategoryFactory.

There is more information about this in a "get-acquainted" doc at


If any of it is unclear, then let me know so that I can change it.  I
appreciate your feedback.

- Paul

Paul Glezen
IT Specialist
WebSphere Engagement Team
Tel: 818 539 3321

To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Notice Regarding Entry of Orders and Instructions:  

Please do not transmit orders and/or instructions regarding your Robertson Stephens account(s)
by e-mail. Orders and/or instructions transmitted by e-mail will not be accepted by Robertson
Stephens, and Robertson Stephens will not be responsible for carrying out such orders and/or

Notice Regarding Privacy and Confidentiality:  

Robertson Stephens reserves the right to monitor and review the content of all e-mail communications
sent and/or received by its employees.


View raw message