Hallo Michael
 
About a year ago it was discussed to have a MultiFileAppender which can cover 
exactly this problem. The idea did not get over a sandbox project and is now 
sleeping. 
 
Using current version of log4j it is possible if you write your own repository 
selector. The default repository is also a singleton, but your self written 
selector can instantiate a repository for each thread. On each thread start you 
will then configure your appender(s) by code.
 
Look at the archive, this was discussed a lot (a year or two ago).
 
Heri
 
 

-----Original Message-----
From: Michael [mailto:[EMAIL PROTECTED]
Sent: Friday, October 19, 2007 11:13 AM
To: log4j-user@logging.apache.org
Subject: [SPAM (Bayesain Analysis)] - Can i instentiate the log4j logger 
object? - Bayesian Filter detected spam



Dear sir,

 

Recently I was try with the log4j to use it to record my system out messages, 
however it seems that when I want to have 2 thread within the same JVM where 
each of them having their own log files is not possible. Because the Logger 
object is singleton. 

 

Is there any way that I can have init 2 different instance of Logger (with 
different configuration of file to be write to) on each thread and each their 
own log files ??

 

 

Thanks,

 

 


 


Logo-sig-(tecforte)

Sincerely,          

Michael Liong

Software Engineer

TecForte Sdn Bhd

‘Smart Security Management’ 

Parcel No 2A-13-2, Plaza Sentral - Phase II,
Jalan Stesen Sentral 5, Kuala Lumpur Sentral,
50470 Kuala Lumpur, Malaysia
Tel: +6(03) 2264 3164 

Fax: +6(03) 2264 3064

 

 <http://www.tecforte.com/> http://www.tecforte.com

 


 

 

 


======================================================================================================


 

 

 


This e-mail and any files transmitted with it are confidential, legally 
privileged and are for the sole use of the intended recipient. If you are not 
the intended recipient of this e-mail or any part of it, you are not to 
reproduce or distribute it. Please notify the sender by return e-mail and 
discard the contents.  In circumstances where the contents of this e-mail may 
have legal significance, you should not place any reliance on its contents 
without following up in writing. 

 

 

 


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.15.1/1078 - Release Date: 10/18/2007 
5:47 PM




Reply via email to