logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daly, Michael" <michael_d...@merck.com>
Subject RE: AW: Multiple Log4J instances in one VM
Date Wed, 07 Aug 2002 12:33:27 GMT
Is there an example of how this should be implemented?

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:	michael_daly@merck.com


-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch]
Sent: Wednesday, August 07, 2002 5:02 AM
To: Log4J Users List
Subject: Re: AW: Multiple Log4J instances in one VM




No, you do not have to use the same config file. Log4j can be
configured multiple times from different configuration files.

Hope this helps,

At 10:56 07.08.2002 +0200, you wrote:
>Hi,
>
>that does not solve the problem that we have to use the same
>config file. And by the way: what shall I do if there are even
>more companies which uses log4j? Or if there will be more?
>
>Andreas Hitzbleck
>
>-----Ursprüngliche Nachricht-----
>Von: Ceki Gülcü [mailto:ceki@qos.ch]
>Gesendet: Mittwoch, 7. August 2002 10:50
>An: Log4J Users List
>Betreff: RE: Multiple Log4J instances in one VM
>
>
>
>Gee. How about configuring your own branch of the hierarchy? As in
>
>log4j.logger.com.my.library=debug, F
>log4j.additivity.com.my.library=false
>
>log4j.appender.F=org.apache.log4j.FileAppender
>log4j.appender.F.File=xyz.log
>log4j.appender.F.layout=org.apache.log4j.PatternLayout
>log4j.appender.F.layout.ConversionPattern=%r %p %t %c - %m%n
>
>
>At 09:38 07.08.2002 +0100, you wrote:
> >Log4j's somewhat static configuration approach strikes me as quite
> >non-object-oriented since it in many ways violates encapsulation and
> >instantiation; a natural requirement for a logging API is that different
> >parts of a program (running in the same VM) should be able to configure
> >their own "instances" of Log4j independent of eachother, e.g. they should
> >not need to ask eachother or the API itself whether it's configured.
> >
> >Everything considered, it seems like getting Log4j to work smoothly (as
is)
> >in a multiple configuration environemt is a cumbersome and unintuitive
>task,
> >and clearly needs to be addressed in later versions.
> >
> >--
> >
> >Thomas
> >
> >
> >  | -----Original Message-----
> >  | From: Ceki Gulcu [mailto:ceki@qos.ch]
> >  | Sent: 07 August 2002 09:17
> >  | To: Log4J Users List
> >  | Subject: RE: Multiple Log4J instances in one VM
> >  |
> >  |
> >  |
> >  | Hmm, that is not it either. I was thinking of simply checking whether
> >  | log4j is already configured. If a component detects that log4j is
> >  | configured, it should not configure log4j.
> >  |
> >  | Here is a more elaborate explanation:
> >  |
> >  | http://marc.theaimsgroup.com/?l=log4j-user&m=102775658930710&w=2
> >  |
> >  |
> >  | At 09:01 07.08.2002 +0100, you wrote:
> >  | >As Ceki points out, there are other ways of solving this, e.g. by
>using
> >  | >different hierarchies for the different "programs".
> >  | >
> >  | >See e.g. org.apache.log4j.net.SocketServer for an example of
> >  | how to obtain
> >  | >this.
> >  | >
> >  | >--
> >  | >
> >  | >Thomas
> >  | >
> >  | >
> >  | >
> >  | >  | -----Original Message-----
> >  | >  | From: Thomas Muller [mailto:ttm@online.no]
> >  | >  | Sent: 07 August 2002 08:22
> >  | >  | To: Log4J Users List
> >  | >  | Subject: RE: Multiple Log4J instances in one VM
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |  | -----Original Message-----
> >  | >  |  | From: Hitzbleck, Andreas (ext. Mitarbeiter)
> >  | >  |  | [mailto:Andreas.Hitzbleck@KVB.de]
> >  | >  |  | Sent: 07 August 2002 08:18
> >  | >  |  | To: 'log4j-user@jakarta.apache.org'
> >  | >  |  | Subject: Multiple Log4J instances in one VM
> >  | >  |  |
> >  | >  |  |
> >  | >  |  | Hello list,
> >  | >  |  |
> >  | >  |  | I am developing a java program which is integrated in a
> >  | big content
> >  | >  |  | management system. Thus, our code runs with some other
> >  | java programs
> >  | >  |  | developed by other companies in one virtual mashine.
> >  | >  |  |
> >  | >  |  | Unfortunately, the Log4J initialization of one program of
>another
> >  | >  |  | company overwrites our Log4J configuration or - if we start
up
> >  | >  |  | our program later - vice versa. I think that is because of
the
> >  | >  |  | statically implementation(s) of the configure() methods in
> >  | >  |  | Property- Basic- and DOMConfigurator?
> >  | >  |  |
> >  | >  |  | Is there a way to solve this problem or to work around it?
>Would
> >  | >  |  | it help to implement my own classloader and load the
> >  | Log4J classes
> >  | >  |  | through this loader?
> >  | >  |
> >  | >  | Yes - different classloaders can utilize different log4j
> >  | libraries and
> >  | >  | configurations.
> >  | >  |
> >  | >  | --
> >  | >  |
> >  | >  | Thomas
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |
> >  | >  |
> >  |
>*************************************************************************
> >  | >  | Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
> >  | >  | reserved.
> >  | >  | The information supplied in this email should be treated in
> >  | confidence.
> >  | >  | No liability whatsoever is accepted for any loss or damage
> >  | >  | suffered as a result of accessing this message or any
attachments.
> >  | >  |
> >  | >  |
> >  |
>________________________________________________________________________
> >  | >  | This email has been scanned for all viruses by the
> >  | MessageLabs SkyScan
> >  | >  | service. For more information on a proactive anti-virus
> >  | service working
> >  | >  | around the clock, around the globe, visit
>http://www.messagelabs.com
> >  | >  |
> >  |
>________________________________________________________________________
> >  | >  |
> >  | >  | --
> >  | >  | To unsubscribe, e-mail:
> >  | ><mailto:log4j-user-unsubscribe@jakarta.apache.org>
> >  | >For additional commands, e-mail:
> ><mailto:log4j-user-help@jakarta.apache.org>
> > >
> > >
> > >
> > >
> >
>*************************************************************************
> > >Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights
reserved.
> > >The information supplied in this email should be treated in confidence.
> > >No liability whatsoever is accepted for any loss or damage
> > >suffered as a result of accessing this message or any attachments.
> > >
> >
>________________________________________________________________________
> > >This email has been scanned for all viruses by the MessageLabs SkyScan
> > >service. For more information on a proactive anti-virus service working
> > >around the clock, around the globe, visit http://www.messagelabs.com
> >
>________________________________________________________________________
> > >
> > >--
> > >To unsubscribe, e-mail:
> ><mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > >For additional commands, e-mail:
> ><mailto:log4j-user-help@jakarta.apache.org>
> >
> >--
> >Ceki
> >
> >
> >--
> >To unsubscribe, e-mail:
><mailto:log4j-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
><mailto:log4j-user-help@jakarta.apache.org>
> >
> >
> >
> >
> >*************************************************************************
> >Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All rights reserved.
> >The information supplied in this email should be treated in confidence.
> >No liability whatsoever is accepted for any loss or damage
> >suffered as a result of accessing this message or any attachments.
> >
> >________________________________________________________________________
> >This email has been scanned for all viruses by the MessageLabs SkyScan
> >service. For more information on a proactive anti-virus service working
> >around the clock, around the globe, visit http://www.messagelabs.com
> >________________________________________________________________________
> >
> >--
> >To unsubscribe, e-mail:
><mailto:log4j-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
><mailto:log4j-user-help@jakarta.apache.org>
>
>--
>Ceki
>
>
>--
>To unsubscribe, e-mail:
<mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
<mailto:log4j-user-help@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:
<mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
<mailto:log4j-user-help@jakarta.apache.org>

--
Ceki


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


------------------------------------------------------------------------------
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 on 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:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message