dcsimg
Logger from JDK SE 1.4.1 doubles messages
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aleksey_Skorokhodov
Posted On:   Friday, July 26, 2002 12:09 AM

Logger from JDK SE 1.4.1 writes out messages not only to MY FileHandler but to stderr also. Note that I have manually deleted all FileHandlers: SQLlogger = Logger.getLogger("name"); FileHandler fh = null; Handler hs[] = SQLlogger.getHandlers(); for (int i=0; i SQLlogger.removeHandler(hs[i]); } fh = new FileHandler("filename", 1000000, 3); fh.setFormatter(new SimpleFormatter()); SQLlogger.addHandler(fh); // Request that every detail gets logged. SQLlogger.setLevel(Level.ALL);    More>>

Logger from JDK SE 1.4.1 writes out messages not only to MY FileHandler but to stderr also.


Note that I have manually deleted all FileHandlers:


			
SQLlogger = Logger.getLogger("name");
FileHandler fh = null;
Handler hs[] = SQLlogger.getHandlers();
for (int i=0; i
SQLlogger.removeHandler(hs[i]);
}

fh = new FileHandler("filename", 1000000, 3);
fh.setFormatter(new SimpleFormatter());
SQLlogger.addHandler(fh);
// Request that every detail gets logged.
SQLlogger.setLevel(Level.ALL);
   <<Less
About | Sitemap | Contact