AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Logger info

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
scoffer
Guest





PostPosted: Tue Jun 20, 2006 9:28 pm    Post subject: Logger info Reply with quote



Hi all,

i need to change the Formatter for the Logger that write on the console.
My code is something like that:

logHandler = new FileHandler("RecVenduto.log", true);
theLogger.addHandler(logHandler);
theLogger.setLevel(logLevel);
Handler hdl [] = theLogger.getHandlers();
for (int cnt=0; cnt < hdl.length; cnt++) {
hdl[cnt].setFormatter(new MyCustomFormatter());
hdl[cnt].setLevel(logLevel);
}

This code change the Formatter for the FileHandler, but the console output
don't change.

Can I set different Levels for FileHandler and console output??

Thanks in advance.


Daniele B.
Software Specialist
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.