Search code examples
logbackmx4j

Debug log do not show in my file, and what is printed on log file, can't figure it out where it comes from?


I use mx4j and logback, here is a sample of my code:

class ABC {

  public void ABCD throws Exception {
      initlog();
      mylog.debug("here 1234");
      try {
         ........
      } catch (Throwable t) {
         throw new MyException(MygErrors.GENERAL_ERROR,
                "Failed to do it: " + e.getMessage(), e);
      }
  }
}

but the debug log "here 1234" is never printed, the MyException and the whole exception stacktrace is printed, can anyone give me a clue what happens here


Solution

  • problem solved. It is because I use '()' in my logback.xml, and that cause a lot of weird problems.