Example #1
0
  @Test
  public void delegatesLevelIsEnabledToSlf4j() {
    logging.setLevel(LogLevel.WARN);

    Logger logger = Logging.getLogger(LoggingTest.class);
    assertTrue(logger.isErrorEnabled());
    assertTrue(logger.isQuietEnabled());
    assertTrue(logger.isWarnEnabled());
    assertFalse(logger.isLifecycleEnabled());
    assertFalse(logger.isInfoEnabled());
    assertFalse(logger.isDebugEnabled());
    assertFalse(logger.isTraceEnabled());

    assertTrue(logger.isEnabled(LogLevel.ERROR));
    assertFalse(logger.isEnabled(LogLevel.INFO));
  }
 private void logWarn(String msg) {
   if (logger.isWarnEnabled()) {
     msg = getSimulcastEngine().getVideoChannel().getEndpoint().getID() + ": " + msg;
     logger.warn(msg);
   }
 }