logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30708] New: - Unwanted log from joranconfigurator
Date Tue, 17 Aug 2004 13:12:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30708>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30708

Unwanted log from joranconfigurator

           Summary: Unwanted log from joranconfigurator
           Product: Log4j
           Version: 1.3alpha
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Configurator
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: mikebk@knology.net


When the joranconfigurator is used, it produces a log "log4j:WARN No appenders could be found
for logger (org.apache.log4j.joran.JoranConfigurator)."

Users shouldn't need to configure a logger for specific log4j components.

Here's a portion of the "Trivial" example demonstrating the problem:

public class Trivial_xml {
    static Logger cat = Logger.getLogger(Trivial_xml.class.getName());


  public static void main(String[] args) {
    JoranConfigurator jc = new JoranConfigurator();
    jc.doConfigure("log4jconfig.xml", LogManager.getLoggerRepository());
    jc.logErrors();
    NDC.push("Client #45890");

    cat.info("Awake awake. Put on thy strength.");
    Trivial_xml.foo();
    InnerTrivial.foo();
    cat.info("Exiting Trivial.");
  }

  static void foo() {
    NDC.push("DB");
    cat.debug("Now king David was old.");
    NDC.pop();
  }

  static class InnerTrivial {
      static Logger cat = Logger.getLogger(InnerTrivial.class.getName());

    static void foo() {
      cat.info("Entered foo.");
    }
  }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message