Class StacklessLogging

java.lang.Object
org.eclipse.jetty.logging.StacklessLogging
All Implemented Interfaces:
AutoCloseable

public class StacklessLogging extends Object implements AutoCloseable
A try-with-resources compatible layer for hiding stacktraces within the scope of the try block when logging with JettyLogger implementation.

Use of other logging implementation cause no effect when using this class

Example:

 try (StacklessLogging scope = new StacklessLogging(EventDriver.class,Noisy.class))
 {
     doActionThatCausesStackTraces();
 }
 
  • Constructor Details

    • StacklessLogging

      public StacklessLogging(Class<?>... classesToSquelch)
    • StacklessLogging

      public StacklessLogging(Package... packagesToSquelch)
    • StacklessLogging

      public StacklessLogging(org.slf4j.Logger... logs)
  • Method Details