static public int convert(ILoggingEvent event) {

    Level level = event.getLevel();

    switch (level.levelInt) {
    case Level.ERROR_INT:
      return SyslogConstants.ERROR_SEVERITY;
    case Level.WARN_INT:
      return SyslogConstants.WARNING_SEVERITY;
    case Level.INFO_INT:
      return SyslogConstants.INFO_SEVERITY;
    case Level.DEBUG_INT:
    case Level.TRACE_INT:
      return SyslogConstants.DEBUG_SEVERITY;
    default:
      throw new IllegalArgumentException("Level " + level
          + " is not a valid level for a printing method");
    }
  }
@Test
  public void smoke() {

    assertEquals(SyslogConstants.DEBUG_SEVERITY, LevelToSyslogSeverity
        .convert(createEventOfLevel(Level.TRACE)));

    assertEquals(SyslogConstants.DEBUG_SEVERITY, LevelToSyslogSeverity
        .convert(createEventOfLevel(Level.DEBUG)));

    assertEquals(SyslogConstants.INFO_SEVERITY, LevelToSyslogSeverity
        .convert(createEventOfLevel(Level.INFO)));

    assertEquals(SyslogConstants.WARNING_SEVERITY, LevelToSyslogSeverity
        .convert(createEventOfLevel(Level.WARN)));

    assertEquals(SyslogConstants.ERROR_SEVERITY, LevelToSyslogSeverity
        .convert(createEventOfLevel(Level.ERROR)));

  }