2 Replies Latest reply: Jun 2, 2007 9:07 PM by 807606 RSS

    Log4j and commons logging

      My application is using log4j, I get my logger as follows:
      private static Logger sLogger = Logger.getLogger(Neolyser.class);
      My problem is that Im using a library thats using commons logging and writes all its logging onto my logger, which I dont want. I want only to see my log statements, I'm happy enough with exceptions and stack traces from the library. So how can I turn off the commons logging? Or at least get it to write to another logger? Thanks in advance,
        • 1. Re: Log4j and commons logging
          Change your log4j configuration so it causes the logging for that library to be written somewhere else (or not written at all).
          • 2. Re: Log4j and commons logging
            Hi thanks for your reply, Im pretty new to log4j so I dont know how to do that. I configure my looger as follows:
            ConsoleAppender lCAppender = new ConsoleAppender(new PatternLayout(lPattern));
            Are there other settings I can use to turn off the library logging? Thanks