Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-220

SLF4JBridgeHandler should remove JUL's Console appender

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • None
    • None
    • jul-to-slf4j
    • None
    • Operating System: Windows XP
      Platform: PC

    Description

      SLF4JBridgeHandler should remove JUL's Console appender ,so no logs will be printed at console

      may be the following code will solve this problem

      SLF4JBridgeHandler.install();
      Handler consolHandler = null;
      Logger logger = Logger.getLogger("");
      for (Handler hand : logger.getHandlers()) {
      if (hand instanceof ConsoleHandler)

      { consolHandler = hand; break; }

      }
      if (consolHandler != null)

      { logger.removeHandler(consolHandler); }

      thanks

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            zhihui.wu@hp.com wu zhi hui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: