dcsimg
Multi threaded use of log4j
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vaibhav_kesarwani
Posted On:   Monday, August 3, 2009 12:49 AM

I want to create instances of loggers in each thread. I have created logger instances in each thread.Eg :- run(){ Logger a = Logger.getLogger("Error"); Logmessages.init(); setLogFiles(); } init() method initializes the Logger. setLogFiles sets the output name & path of logger file. Problem i am getting is that 3 instances of logger creates 3 different directories but the output of all 3 instances is written in only one logger. ideally it should be written in each logger respectively. Kindly help me....    More>>

I want to create instances of loggers in each thread.

I have created logger instances in each thread.Eg :-

run(){

Logger a = Logger.getLogger("Error");

Logmessages.init();

setLogFiles();

}



init() method initializes the Logger.

setLogFiles sets the output name & path of logger file.



Problem i am getting is that 3 instances of logger creates 3 different directories but the output of all 3 instances is written in only one logger.

ideally it should be written in each logger respectively.



Kindly help me....    <<Less
About | Sitemap | Contact