Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
package ch.qos.logback.classic.filter;
Filters events below the threshold level. Events with a level below the specified level will be denied, while events with a level equal or above the specified level will trigger a FilterReply.NEUTRAL result, to allow the rest of the filter chain process the event. For more information about filters, please refer to the online manual at

S├ębastien Pennec
public class ThresholdFilter extends Filter<ILoggingEvent> {
  public FilterReply decide(ILoggingEvent event) {
    if (!isStarted()) {
      return .;
    if (event.getLevel().isGreaterOrEqual()) {
      return .;
    } else {
      return .;
  public void setLevel(String level) {
    this. = Level.toLevel(level);
  public void start() {
    if (this. != null) {
New to GrepCode? Check out our FAQ X