Skip to content

Instantly share code, notes, and snippets.

@acontal
Created November 23, 2013 12:09
Show Gist options
  • Save acontal/7613917 to your computer and use it in GitHub Desktop.
Save acontal/7613917 to your computer and use it in GitHub Desktop.
Mute Jetty 8 logging.
/**
* Usage: <code>org.eclipse.jetty.util.log.Log.setLog(new JettySilentLogger());</code>
*/
public class JettySilentLogger implements org.eclipse.jetty.util.log.Logger {
@Override public void debug(Throwable arg0) {}
@Override public void debug(String arg0, Object... arg1) {}
@Override public void debug(String arg0, Throwable arg1) {}
@Override public Logger getLogger(String arg0) { return this; }
@Override public String getName() { return this.getName(); }
@Override public void ignore(Throwable arg0) {}
@Override public void info(Throwable arg0) {}
@Override public void info(String arg0, Object... arg1) {}
@Override public void info(String arg0, Throwable arg1) {}
@Override public boolean isDebugEnabled() { return false; }
@Override public void setDebugEnabled(boolean arg0) {}
@Override public void warn(Throwable arg0) {}
@Override public void warn(String arg0, Object... arg1) {}
@Override public void warn(String arg0, Throwable arg1) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment