Hi All,

If in code, I call
LogManager.getLoggerRepository().setThreshold(Level.INFO), it sets the level
correctly, but my Receivers seem to continue to post events ?!?

I think I am missing something fundamental here (probably due to lack of
caffeine).  In the Receiver class:

  public void doPost(LoggingEvent event) {
    // if event does not meet threshold, exit now
    if (!isAsSevereAsThreshold(event.getLevel())) {
      return;
    }
      
    // get the "local" logger for this event from the
    // configured repository.
    Logger localLogger =
      getLoggerRepository().getLogger(event.getLoggerName());

    // if the logger level is greater or equal to the level
    // of the event, use the logger to append the event.
    if (event.getLevel().isGreaterOrEqual(localLogger.getEffectiveLevel()))
{
      // call the loggers appenders to process the event
      localLogger.callAppenders(event);
    }
  }

How does setting the LoggerRepository threshold change trickle down to
setting the localLogger effective level?  From looking at the code, it
doesn't seem to, but is that just because I am blind?

cheers,
_________________________
Paul Smith 
Lawlex Compliance Solutions
phone: +61 3 9278 1511
email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to