Thanks

T

tekwiz

Thanks for you assistance. The problem was the the logger didn't have
any handlers (aside from the parent's). And, yes, I realize the best
way is to do things through the configs -- what I was doing was simply
for a proof of concept.

So, for those wanting to know the not-so-correct (but functional) way
to do logging:

Logger l = Logger.getLogger("TestLog");
l.setUseParentHandlers(false);
l.addHandler(new ConsoleHandler());
l.getHandlers()[0].setLevel(Level.ALL);

l.setLevel(Level.ALL);
l.info("test");
l.fine("test");
l.finer("test");
l.finest("test");


Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Logger not logging. 4
java.util.logging: file handler leaves lock on file 1
protect logger from shutdown syslogd 0
Question about loggers 26
log4j 1
FileHandler 0
log4j Setups 0
Removing default ConsoleHandler 0

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top