Java Code Examples for ch.qos.logback.classic.Level

The following examples show how to use ch.qos.logback.classic.Level. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: java-sdk   Source File: DecisionServiceTest.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verify that {@link DecisionService#getVariationForFeatureInRollout(FeatureFlag, String, Map, ProjectConfig)}
 * returns null when trying to bucket a user into a {@link FeatureFlag}
 * that does not have a {@link Rollout} attached.
 */
@Test
public void getVariationForFeatureInRolloutReturnsNullWhenFeatureIsNotAttachedToRollout() {
    FeatureFlag mockFeatureFlag = mock(FeatureFlag.class);
    when(mockFeatureFlag.getRolloutId()).thenReturn("");
    String featureKey = "featureKey";
    when(mockFeatureFlag.getKey()).thenReturn(featureKey);

    FeatureDecision featureDecision = decisionService.getVariationForFeatureInRollout(
        mockFeatureFlag,
        genericUserId,
        Collections.<String, String>emptyMap(),
        validProjectConfig
    );
    assertNull(featureDecision.variation);
    assertNull(featureDecision.decisionSource);

    logbackVerifier.expectMessage(
        Level.INFO,
        "The feature flag \"" + featureKey + "\" is not used in a rollout."
    );
}
 
Example 2
Source Project: gocd   Source File: AgentServiceTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
void shouldThrowExceptionWhenAgentWithNoCookieTriesToUpdateRuntimeInfo() {
    AgentRuntimeInfo runtimeInfo = new AgentRuntimeInfo(agentIdentifier, Idle, currentWorkingDirectory(), null);

    try (LogFixture logFixture = logFixtureFor(AgentService.class, Level.DEBUG)) {
        try {
            agentService.updateRuntimeInfo(runtimeInfo);
            fail("should throw exception when no cookie is set");
        } catch (Exception e) {
            assertThat(e, instanceOf(AgentNoCookieSetException.class));
            assertThat(e.getMessage(), is(format("Agent [%s] has no cookie set", runtimeInfo.agentInfoDebugString())));
            assertThat(logFixture.getRawMessages(), hasItem(format("Agent [%s] has no cookie set", runtimeInfo.agentInfoDebugString())));
        }
    }

}
 
Example 3
Source Project: logging-java   Source File: LoggerThresholdFilterTest.java    License: Apache License 2.0 6 votes vote down vote up
@Test
public void verifyFilteringAllAtWarn() {
    final LoggerThresholdFilter filter = new LoggerThresholdFilter();
    filter.setLevel(WARN);
    filter.start();

    for(Level level : allLevels) {
        final LoggingEvent evt = new LoggingEvent();
        evt.setLevel(level);
        for(String logger : variousLoggers) {
            evt.setLoggerName(logger);
            if(level.isGreaterOrEqual(WARN))
                assertEquals(FilterReply.NEUTRAL, filter.decide(evt));
            else
                assertEquals(FilterReply.DENY, filter.decide(evt));
        }
    }
}
 
Example 4
private void doConfigure(LogLevel logLevel) {
    LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
    Logger rootLogger = context.getLogger(Logger.ROOT_LOGGER_NAME);

    if (currentLevel == null) {
        context.reset();
        context.addTurboFilter(new GradleFilter());
        context.getLogger("org.apache.http.wire").setLevel(Level.OFF);
        GradleAppender appender = new GradleAppender();
        appender.setContext(context);
        appender.start();
        rootLogger.addAppender(appender);
    }

    currentLevel = logLevel;
    rootLogger.setLevel(LogLevelConverter.toLogbackLevel(logLevel));
}
 
Example 5
@Test
public void testReadOnlyPutUserCredentialsFails() {
  String exceptionMessage = "Identity service implementation is read-only.";
  User userUdpdate = MockProvider.createMockUser();
  when(identityServiceMock.isReadOnly()).thenReturn(true);

  given()
      .pathParam("id", MockProvider.EXAMPLE_USER_ID)
      .body(UserCredentialsDto.fromUser(userUdpdate)).contentType(ContentType.JSON)
  .then().expect()
      .statusCode(Status.FORBIDDEN.getStatusCode()).contentType(ContentType.JSON)
      .body("type", equalTo(InvalidRequestException.class.getSimpleName()))
      .body("message", equalTo(exceptionMessage))
  .when().put(USER_CREDENTIALS_URL);

  verify(identityServiceMock, never()).saveUser(userUdpdate);
  verifyLogs(Level.DEBUG, exceptionMessage);
}
 
Example 6
Source Project: glowroot   Source File: CollectorLogbackAppender.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void append(ILoggingEvent event) {
    if (inFlush.get()) {
        return;
    }
    if (event.getLevel() == Level.DEBUG && event.getLoggerName().startsWith("io.grpc.")) {
        return;
    }
    if (event.getLoggerName().startsWith("org.glowroot.central.")
            || event.getLoggerName().startsWith("org.glowroot.ui.")) {
        // this can happen during integration tests when agent and the central collector are
        // running in the same JVM (using LocalContainer for agent)
        return;
    }
    LogEvent.Builder builder = LogEvent.newBuilder()
            .setTimestamp(event.getTimeStamp())
            .setLevel(toProto(event.getLevel()))
            .setLoggerName(event.getLoggerName())
            .setMessage(event.getFormattedMessage());
    IThrowableProxy throwable = event.getThrowableProxy();
    if (throwable != null) {
        builder.setThrowable(toProto(throwable));
    }
    flush(builder.build());
}
 
Example 7
Source Project: java-sdk   Source File: OptimizelyTest.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verify {@link Optimizely#getFeatureVariableInteger(String, String, String)}
 * calls through to {@link Optimizely#getFeatureVariableInteger(String, String, String, Map)}
 * and returns null
 * when called with a null value for the feature Key parameter.
 */
@SuppressFBWarnings("NP_NONNULL_PARAM_VIOLATION")
@Test
public void getFeatureVariableIntegerReturnsNullWhenFeatureKeyIsNull() throws Exception {
    String variableKey = "";

    Optimizely spyOptimizely = spy(optimizelyBuilder.build());
    assertNull(spyOptimizely.getFeatureVariableInteger(null, variableKey, genericUserId));
    logbackVerifier.expectMessage(Level.WARN, "The featureKey parameter must be nonnull.");

    verify(spyOptimizely, times(1)).getFeatureVariableInteger(
        isNull(String.class),
        any(String.class),
        any(String.class),
        anyMapOf(String.class, String.class)
    );
}
 
Example 8
@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
	if (params != null && logger.getName().startsWith("discord4j.gateway.inbound")) {
		for (Object param : params) {
			if (param instanceof GatewayPayload) {
				GatewayPayload<?> payload = (GatewayPayload) param;
				if (Opcode.DISPATCH.equals(payload.getOp())) {
					if (excludedEvents != null) {
						if (excludedEvents.contains(payload.getType())) {
							return FilterReply.DENY;
						}
					} else if (includedEvents != null) {
						if (!includedEvents.contains(payload.getType())) {
							return FilterReply.DENY;
						}
					}
				}
			}
		}
	}
	return FilterReply.NEUTRAL;
}
 
Example 9
@Test
void killsSpringBootApplication() {
  KillAppAssault killAppAssault = new KillAppAssault(null, metricsMock);
  killAppAssault.attack();

  verify(mockAppender, times(2)).doAppend(captorLoggingEvent.capture());

  assertEquals(Level.INFO, captorLoggingEvent.getAllValues().get(0).getLevel());
  assertEquals(Level.INFO, captorLoggingEvent.getAllValues().get(1).getLevel());
  assertEquals(
      "Chaos Monkey - I am killing your Application!",
      captorLoggingEvent.getAllValues().get(0).getMessage());
  assertEquals(
      "Chaos Monkey - Unable to kill the App, I am not the BOSS!",
      captorLoggingEvent.getAllValues().get(1).getMessage());
}
 
Example 10
Source Project: jlineup   Source File: Utils.java    License: Apache License 2.0 6 votes vote down vote up
public static void logToFile(String workingDir) {
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    PatternLayoutEncoder ple = new PatternLayoutEncoder();

    ple.setPattern("%date %level [%thread] %logger{10} [%file:%line] %msg%n");
    ple.setContext(lc);
    ple.start();
    FileAppender<ILoggingEvent> fileAppender = new FileAppender<>();
    fileAppender.setName(JLINEUP_FILE_APPENDER);
    fileAppender.setFile(workingDir + "/jlineup.log");
    fileAppender.setEncoder(ple);
    fileAppender.setContext(lc);
    fileAppender.start();

    ch.qos.logback.classic.Logger logger = (ch.qos.logback.classic.Logger)LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
    logger.addAppender(fileAppender);
    logger.setLevel(Level.DEBUG);
}
 
Example 11
public static Level toLogbackLevel(LogLevel level) {
    switch (level) {
        case DEBUG:
            return Level.DEBUG;
        case INFO:
        case LIFECYCLE:
        case QUIET:
            return Level.INFO;
        case WARN:
            return Level.WARN;
        case ERROR:
            return Level.ERROR;
        default:
            throw new IllegalArgumentException("Don't know how to map Gradle log level '" + level + "' to a Logback log level");
    }
}
 
Example 12
Source Project: java-sdk   Source File: OptimizelyTest.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verify that {@link Optimizely#getVariation(String, String)} gives precedence to experiment status over forced
 * variation bucketing.
 */
@Test
public void getVariationExperimentStatusPrecedesForcedVariation() throws Exception {
    Experiment experiment;
    if (datafileVersion >= 4) {
        experiment = validProjectConfig.getExperimentKeyMapping().get(EXPERIMENT_PAUSED_EXPERIMENT_KEY);
    } else {
        experiment = validProjectConfig.getExperiments().get(1);
    }

    Optimizely optimizely = optimizelyBuilder.build();

    logbackVerifier.expectMessage(Level.INFO, "Experiment \"" + experiment.getKey() + "\" is not running.");
    // testUser3 has a corresponding forced variation, but experiment status should be checked first
    assertNull(optimizely.getVariation(experiment.getKey(), "testUser3"));
}
 
Example 13
Source Project: emissary   Source File: Emissary.java    License: Apache License 2.0 6 votes vote down vote up
static void setupLogbackForConsole() {
    // So it looks better when commands are run
    ch.qos.logback.classic.Logger root =
            (ch.qos.logback.classic.Logger) org.slf4j.LoggerFactory.getLogger(ch.qos.logback.classic.Logger.ROOT_LOGGER_NAME);
    root.detachAndStopAllAppenders();
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    lc.reset();

    PatternLayoutEncoder ple = new PatternLayoutEncoder();
    ple.setPattern("%msg%n");
    ple.setContext(lc);
    ple.start();

    ConsoleAppender<ILoggingEvent> consoleAppender = new ConsoleAppender<>();
    consoleAppender.setEncoder(ple);
    consoleAppender.setContext(lc);
    consoleAppender.start();

    root.addAppender(consoleAppender);
    root.setLevel(Level.INFO);
    root.setAdditive(false);
}
 
Example 14
Source Project: edison-microservice   Source File: JobMessageLogAppender.java    License: Apache License 2.0 6 votes vote down vote up
@Override
protected void append(final ILoggingEvent eventObject) {
    Map<String, String> mdcMap = eventObject.getMDCPropertyMap();
    // TODO: check for JOB marker:
    if (mdcMap.containsKey("job_id") && eventObject.getMarker() != null && JobMarker.JOB.contains(eventObject.getMarker())) {
        String jobId = mdcMap.get("job_id");
        Level level = eventObject.getLevel();
        de.otto.edison.jobs.domain.Level edisonLevel = logLevelToEdisonLevel(level);

        String message = eventObject.getFormattedMessage();

        try {
            final JobMessage jobMessage = jobMessage(edisonLevel, message, OffsetDateTime.now());
            jobService.appendMessage(jobId, jobMessage);
        }
        catch(final RuntimeException e) {
            addError("Failed to persist job message (jobId=" + jobId + "): " + message, e);
        }
    }
}
 
Example 15
Source Project: java-spring-cloud   Source File: SpanLogsAppender.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * This is called only for configured levels.
 * It will not be executed for DEBUG level if root logger is INFO.
 */
@Override
protected void append(ILoggingEvent event) {
  Span span = tracer.activeSpan();
  if (span != null) {
    Map<String, Object> logs = new HashMap<>(6);
    logs.put("logger", event.getLoggerName());
    logs.put("level", event.getLevel().toString());
    logs.put("thread", event.getThreadName());
    logs.put("message", event.getFormattedMessage());

    if (Level.ERROR.equals(event.getLevel())) {
      logs.put("event", Tags.ERROR);
    }

    IThrowableProxy throwableProxy = event.getThrowableProxy();
    if (throwableProxy instanceof ThrowableProxy) {
      Throwable throwable = ((ThrowableProxy)throwableProxy).getThrowable();
      // String stackTrace = ThrowableProxyUtil.asString(throwableProxy);
      if (throwable != null) {
        logs.put("error.object", throwable);
      }
    }
    span.log(TimeUnit.MICROSECONDS.convert(event.getTimeStamp(), TimeUnit.MILLISECONDS), logs);
  }
}
 
Example 16
@Test
public void existingLine() throws Exception {
    String token = "checkingLine";
    String type = "withLineType" + random(8);
    String loggerName = "test" + random(8);
    int drainTimeout = 1;
    String message1 = "Hostname log - " +  random(5);

    Logger testLogger = createLogger(logzioLogbackAppender, token, type, loggerName, drainTimeout, false, true, null, false);
    testLogger.info(message1);

    // Sleep double time the drain timeout
    sleepSeconds(2 * drainTimeout);

    mockListener.assertNumberOfReceivedMsgs(1);
    MockLogzioBulkListener.LogRequest logRequest = mockListener.assertLogReceivedByMessage(message1);
    mockListener.assertLogReceivedIs(logRequest, token, type, loggerName, Level.INFO.levelStr);
    assertThat(logRequest.getStringFieldOrNull("line")).isNotNull();
}
 
Example 17
Source Project: NationStatesPlusPlus   Source File: LoggerOutputStream.java    License: MIT License 6 votes vote down vote up
@Override
public synchronized void flush() throws IOException {
	super.flush();
	String record = this.toString();
	super.reset();

	if (record.length() > 0 && !record.equals(separator) && level != Level.OFF) {
		if (level == Level.TRACE)
			log.trace(record);
		else if (level == Level.DEBUG)
			log.debug(record);
		else if (level == Level.INFO)
			log.info(record);
		else if (level == Level.WARN)
			log.warn(record);
		else if (level == Level.ERROR)
			log.error(record);
	}
}
 
Example 18
Source Project: libreveris   Source File: LogUtil.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
public static Level toLevel (final String str)
{
    switch (str.toUpperCase()) {
    case "ALL":
        return Level.ALL;

    case "TRACE":
        return Level.TRACE;

    case "DEBUG":
        return Level.DEBUG;

    case "INFO":
        return Level.INFO;

    case "WARN":
        return Level.WARN;

    case "ERROR":
        return Level.ERROR;

    default:
    case "OFF":
        return Level.OFF;
    }
}
 
Example 19
Source Project: cuba   Source File: LogbackConfigurator.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void configure(LoggerContext loggerContext) {
    printInfo("Setting up CUBA default logging configuration");

    try {
        URL url = findURLOfConfigurationFile(true);
        if (url != null) {
            configureByResource(url);
        } else {
            printInfo("Configuring console output with WARN threshold");
            BasicConfigurator basicConfigurator = new BasicConfigurator();
            basicConfigurator.setContext(loggerContext);
            basicConfigurator.configure(loggerContext);
            Logger rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
            rootLogger.setLevel(Level.WARN);
        }
    } catch (Exception e) {
        printError("Failed to configure CUBA default logging: " + e);
    }
}
 
Example 20
@Test
public void testDecideForNonWildCardLoggerName() throws Exception
{
    LoggerNameAndLevelFilter filter = new LoggerNameAndLevelFilter("org.apache.qpid", Level.INFO);

    ILoggingEvent event = mock(ILoggingEvent.class);
    when(event.getLevel()).thenReturn(Level.INFO);
    when(event.getLoggerName()).thenReturn("org.apache.qpid");
    assertEquals("Unexpected reply for matching log level and same logger name",
                        FilterReply.ACCEPT,
                        filter.decide(event));

    when(event.getLoggerName()).thenReturn("org.apache.qpid.foo");
    assertEquals("Unexpected reply for matching log level and not same logger name",
                        FilterReply.NEUTRAL,
                        filter.decide(event));

    when(event.getLevel()).thenReturn(Level.DEBUG);
    when(event.getLoggerName()).thenReturn("org.apache.qpid");
    assertEquals("Unexpected reply for non matching log leve and same logger namel",
                        FilterReply.DENY,
                        filter.decide(event));
}
 
Example 21
Source Project: snowflake-jdbc   Source File: SLF4JLoggerIT.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Converts log levels in {@link LogLevel} to appropriate levels in
 * {@link Level}.
 */
private Level toLogBackLevel(LogLevel level)
{
  switch (level)
  {
    case ERROR:
      return Level.ERROR;
    case WARNING:
      return Level.WARN;
    case INFO:
      return Level.INFO;
    case DEBUG:
      return Level.DEBUG;
    case TRACE:
      return Level.TRACE;
  }

  return Level.TRACE;
}
 
Example 22
Source Project: helios   Source File: LoggingLogStreamFollowerTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testSingleLineNoNewline() throws Exception {
  final Iterator<LogMessage> stream = stream(stdout("abc123"));

  final LoggingLogStreamFollower sut = LoggingLogStreamFollower.create(log);
  sut.followLog(JobId.fromString("a:b:c"), "d", stream);

  assertThat(appender.events(),
      contains(event(Level.INFO, "[a] [d] 1 abc123")));
}
 
Example 23
@Test
public void testEncoder() {
    String token = "testEncoder";
    String type = "testEncoder" + random(8);
    String loggerName = "testEncoder" + random(8);
    int drainTimeout = 1;
    String message1 = "Just a log - " + random(5);

    LoggingEventCompositeJsonEncoder encoder = new LoggingEventCompositeJsonEncoder();
    encoder.getProviders().addProvider(new LogLevelJsonProvider());
    encoder.getProviders().addProvider(new MessageJsonProvider());
    encoder.getProviders().addProvider(withPattern(String.format("{ \"loglevel\": \"%s\" }", "INFO"), new LoggingEventPatternJsonProvider()));
    encoder.getProviders().addProvider(withPattern(String.format("{ \"type\": \"%s\" }", type), new LoggingEventPatternJsonProvider()));
    encoder.getProviders().addProvider(withPattern(String.format("{ \"logger\": \"%s\" }", loggerName), new LoggingEventPatternJsonProvider()));
    encoder.getProviders().addProvider(withName("timestamp", new LoggingEventFormattedTimestampJsonProvider()));

    logzioLogbackAppender.setEncoder(encoder);

    Logger testLogger = createLogger(logzioLogbackAppender, "testEncoder", type, loggerName, drainTimeout, false, false, null, false);
    encoder.start();

    testLogger.info(message1);

    sleepSeconds(2 * drainTimeout);

    mockListener.assertNumberOfReceivedMsgs(1);
    MockLogzioBulkListener.LogRequest logRequest = mockListener.assertLogReceivedByMessage(message1);
    mockListener.assertLogReceivedIs(logRequest, token, type, loggerName, Level.INFO.levelStr);
}
 
Example 24
private static Level disableLogging() {
	LoggerContext logContext = (LoggerContext) LoggerFactory.getILoggerFactory();
	Logger logger = logContext.getLogger(SimpleMessageListenerContainer.class);
	Level previous = logger.getLevel();
	logger.setLevel(Level.OFF);
	return previous;
}
 
Example 25
Source Project: summerframework   Source File: LogbackLevelSetter.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void setLoggerLevel(String name, String level) {
    LoggerContext loggerContext = (LoggerContext)LoggerFactory.getILoggerFactory();
    List<Logger> loggerList = loggerContext.getLoggerList();
    for (ch.qos.logback.classic.Logger logger : loggerList) {
        if (name.equals(logger.getName())) {
            logger.setLevel(Level.valueOf(level));
        }
    }
}
 
Example 26
Source Project: java-sdk   Source File: NotificationCenterTest.java    License: Apache License 2.0 5 votes vote down vote up
@Test
public void testAddWrongTrackNotificationListener() {
    int notificationId = notificationCenter.addNotificationListener(NotificationCenter.NotificationType.Activate, trackNotification);
    logbackVerifier.expectMessage(Level.WARN, "Notification listener was the wrong type. It was not added to the notification center.");
    assertEquals(-1, notificationId);
    assertFalse(notificationCenter.removeNotificationListener(notificationId));
}
 
Example 27
@PutMapping("/logs")
@ResponseStatus(HttpStatus.NO_CONTENT)
@Timed
public void changeLevel(@RequestBody LoggerVM jsonLogger) {
    LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
    context.getLogger(jsonLogger.getName()).setLevel(Level.valueOf(jsonLogger.getLevel()));
}
 
Example 28
Source Project: konker-platform   Source File: KonkerLogger.java    License: Apache License 2.0 5 votes vote down vote up
public boolean isWarnEnabled(Marker marker) {
    FilterReply decision = this.callTurboFilters(marker, Level.WARN);
    if(decision == FilterReply.NEUTRAL) {
        return this.effectiveLevelInt <= 30000;
    } else if(decision == FilterReply.DENY) {
        return false;
    } else if(decision == FilterReply.ACCEPT) {
        return true;
    } else {
        throw new IllegalStateException("Unknown FilterReply value: " + decision);
    }
}
 
Example 29
Source Project: java-sdk   Source File: OptimizelyTest.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Verify that {@link Optimizely#track(String, String, Map, Map)} called with null event name will return and will not track
 */
@Test
@SuppressFBWarnings(
    value = "NP_NONNULL_PARAM_VIOLATION",
    justification = "testing nullness contract violation")
public void trackEventWithNullOrEmptyEventKey() throws Exception {
    // call track with null event key
    Optimizely optimizely = optimizelyBuilder.build();
    optimizely.track(null, genericUserId);

    logbackVerifier.expectMessage(Level.ERROR, "Event Key is null or empty when non-null and non-empty String was expected.");
    logbackVerifier.expectMessage(Level.INFO, "Not tracking event for user \"" + genericUserId + "\".");
}
 
Example 30
Source Project: micrometer   Source File: LogbackMetrics.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
    // When filter is asked for decision for an isDebugEnabled call or similar test, there is no message (ie format) 
    // and no intention to log anything with this call. We will not increment counters and can return immediately and
    // avoid the relatively expensive ThreadLocal access below. See also logbacks Logger.callTurboFilters().
    if (format == null) {
        return FilterReply.NEUTRAL;
    }

    Boolean ignored = LogbackMetrics.ignoreMetrics.get();
    if (ignored != null && ignored) {
        return FilterReply.NEUTRAL;
    }

    // cannot use logger.isEnabledFor(level), as it would cause a StackOverflowError by calling this filter again!
    if (level.isGreaterOrEqual(logger.getEffectiveLevel())) {
        switch (level.toInt()) {
            case Level.ERROR_INT:
                errorCounter.increment();
                break;
            case Level.WARN_INT:
                warnCounter.increment();
                break;
            case Level.INFO_INT:
                infoCounter.increment();
                break;
            case Level.DEBUG_INT:
                debugCounter.increment();
                break;
            case Level.TRACE_INT:
                traceCounter.increment();
                break;
        }
    }

    return FilterReply.NEUTRAL;
}