Separate properties file for each category

2002-07-24 Thread Daly, Michael

Is there a way to have a properties file defined for each category? I would
like each application within a JVM to be able to configure their application
logging without needing one giant log4j.properties file that every app must
edit (and potentially cause problems for other apps).

Is this possible?

Looking at the Javadocs, it looks like in the PropertyConfigurator there is
a doConfigure(Properties properties, Hierarchy hierarchy) method where it
appears I can assign a set of properties to a hierarchy. Am I on the right
track looking at this?

Michael S. Daly
MerckVaccines.com(TM)
Merck  Co., Inc.
MVD IS
Mail:   WP97-A369
Phone:  215-652-4735
Pager:  1-888-621-5636
Fax:215-652-8846
E-mail: [EMAIL PROTECTED]



--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, 
proprietary copyrighted and/or legally privileged, and is intended solely for the use 
of the individual or entity named in this message.  If you are not the intended 
recipient, and have received this message in error, please immediately return this by 
e-mail and then delete it.

==


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




RE: Logging to separate files

2002-07-22 Thread Daly, Michael

How do I instruct each component to write to the correct logfile?

Michael S. Daly
MerckVaccines.com(TM)
Merck  Co., Inc.
MVD IS
Mail:   WP97-A369
Phone:  215-652-4735
Pager:  1-888-621-5636
Fax:215-652-8846
E-mail: [EMAIL PROTECTED]


-Original Message-
From: Havaldar, Raghu [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 4:29 PM
To: 'Log4J Users List'
Subject: RE: Logging to separate files


There are multiple solutions, a simpler one of which is below:

- create 2 loggers, each hooked with a FileAppender. 
- have your component log to those separate loggers.

example config:

log4j.rootLogger=DEBUG,

log4j.logger.logger1=INFO,fileAppender1
log4j.logger.logger2=INFO,fileAppender2

log4j.appender.fileAppender1=org.apache.log4j.FileAppender
log4j.appender.fileAppender1.File=file1.log

log4j.appender.fileAppender2=org.apache.log4j.FileAppender
log4j.appender.fileAppender2.File=file2.log

-raghu


-Original Message-
From: Daly, Michael [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 4:55 PM
To: '[EMAIL PROTECTED]'
Subject: Logging to separate files


I have two separate components running as part of a single app. Is there a
way to have each component log to it's own log file? I have not been able to
find an example of this in the docs but I think I saw it eluded to.

If I have two separate apps running in the same JVM, how do I configure
their logging configuration separately?

Michael S. Daly
MerckVaccines.com(TM)
Merck  Co., Inc.
MVD IS
Mail:   WP97-A369
Phone:  215-652-4735
Pager:  1-888-621-5636
Fax:215-652-8846
E-mail: [EMAIL PROTECTED]




--
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (Whitehouse Station, New Jersey, USA) that
may be confidential, proprietary copyrighted and/or legally privileged, and
is intended solely for the use of the individual or entity named in this
message.  If you are not the intended recipient, and have received this
message in error, please immediately return this by e-mail and then delete
it.


==


--
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]



--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, 
proprietary copyrighted and/or legally privileged, and is intended solely for the use 
of the individual or entity named in this message.  If you are not the intended 
recipient, and have received this message in error, please immediately return this by 
e-mail and then delete it.

==


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