logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@aconex.com>
Subject Re: Application Context Logging
Date Tue, 14 Dec 2004 21:00:59 GMT
Jim, this is exactly the sort of use case the MultiplexAppender 
(primordial version in CVS Head) is being designed to solve, 
unfortunately I have struggled with how to properly configure it from 
config files, and also beating my current workload back with a stick to 
try and get some continuity to complete it.

the theory is, MultiplexAppender would have a configuration element with 
a form similar to:

<...... filenamePattern="mywebabb.%X{my host}.%{my application}.log" >

where %X{...} represents the key to the MDC entry to derive a value and 
determine which actual appender inside Multiplex should accept the event.

Perhaps you would be interested in having a look at what is currently 
there in CVS Head and commenting and perhaps see if I am completely off 
track?

cheers,

Paul Smith

Jim Morrison wrote:

> Hi,
>
> I need to log messages from separate applications in the same jvm 
> which use the same common classes, so in essence i am doing this
>
> log.info("my host", "my application", "my message" )
>
> through a wrapper over log4j. Any Ideas how i can write these messages 
> to a different log file for each host/application pair, so we have
>
> host1.app1.log
> host1.app2.log
> host2.app1.log  etc
>
> Would this mean using a custom appender ? Are there any examples 
> around on the web ?
>
> Regards
> James
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>

-- 

*Paul Smith
*Software Architect

	

*Aconex
* 31 Drummond Street, Carlton, VIC 3053, Australia
*Tel: +61 3 9661 0200  *Fax: +61 3 9654 9946
Email: psmith@aconex.com  www.aconex.com**

This email and any attachments are intended solely for the addressee. 
The contents may be privileged, confidential and/or subject to copyright 
or other applicable law. No confidentiality or privilege is lost by an 
erroneous transmission. If you have received this e-mail in error, 
please let us know by reply e-mail and delete or destroy this mail and 
all copies. If you are not the intended recipient of this message you 
must not disseminate, copy or take any action in reliance on it. The 
sender takes no responsibility for the effect of this message upon the 
recipient's computer system.**


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


Mime
View raw message