private LogLevel log4jToGenericLogLevel(Level level){
  LogLevel logLevel=LogLevel.ALL;
  if (level.equals(Level.OFF)) {
    logLevel=LogLevel.OFF;
  }
 else   if (level.equals(Level.FATAL)) {
    logLevel=LogLevel.FATAL;
  }
 else   if (level.equals(Level.ERROR)) {
    logLevel=LogLevel.ERROR;
  }
 else   if (level.equals(Level.WARN)) {
    logLevel=LogLevel.WARN;
  }
 else   if (level.equals(Level.INFO)) {
    logLevel=LogLevel.INFO;
  }
 else   if (level.equals(Level.DEBUG)) {
    logLevel=LogLevel.DEBUG;
  }
 else   if (level.equals(Level.TRACE)) {
    logLevel=LogLevel.TRACE;
  }
 else   if (level.equals(Level.ALL)) {
    logLevel=LogLevel.ALL;
  }
 else {
    LOGGER.warn("Unsupported log level encountered: " + level.toString() + ". Using ALL.");
  }
  return logLevel;
}

private LogLevel log4jToGenericLogLevel ( Level level ) { LogLevel logLevel = LogLevel . ALL ; if ( level . equals ( Level . OFF ) ) { logLevel = LogLevel . OFF ; } else if ( level . equals ( Level . FATAL ) ) { logLevel = LogLevel . FATAL ; } else if ( level . equals ( Level . ERROR ) ) { logLevel = LogLevel . ERROR ; } else if ( level . equals ( Level . WARN ) ) { logLevel = LogLevel . WARN ; } else if ( level . equals ( Level . INFO ) ) { logLevel = LogLevel . INFO ; } else if ( level . equals ( Level . DEBUG ) ) { logLevel = LogLevel . DEBUG ; } else if ( level . equals ( Level . TRACE ) ) { logLevel = LogLevel . TRACE ; } else if ( level . equals ( Level . ALL ) ) { logLevel = LogLevel . ALL ; } else { LOGGER . warn ( "Unsupported log level encountered: " + level . toString ( ) + ". Using ALL." ) ; } return logLevel ; }
converts a log4j specific log level to a generic log level .
