Thanks



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.
--
Travis
.



Relevant Pages

  • Re: A new way to configure Python logging
    ... I used that particular level for logging within a unit test ... you need to do programmatic configuration anyway. ... logger* to process incoming LogRecords. ... The Handlers will usually employ elaborate filtering, ...
    (comp.lang.python)
  • Re: A new way to configure Python logging
    ... post about your usage of logging. ... I usually register a logger 'foo' within the application and one logger ... you need to do programmatic configuration anyway. ... so that it is easy to just add multiple handlers for various levels to ...
    (comp.lang.python)
  • Logging with no handlers configured
    ... logger or its parents and you try to log events with that logger, ... No handlers could be found for logger ... logging or configure any handlers, the spurious message should not be ... the logging system will not give any notification. ...
    (comp.lang.python)
  • Re: Logging
    ... record of all the handlers and then calling flush on the handler ... followed by removeHandler from the logger. ... as a feature request for logging. ... Neil Benn ...
    (comp.lang.python)
  • Re: Logging: how to suppress default output when adding handlers?
    ... But if any of my code calls a logger ... thelogging ... or remove it when I 'm setting up my handlers? ... Configure the logging system yourself before any logging call is ...
    (comp.lang.python)