Package org.eclipse.jetty.util.log
Class StacklessLogging
- java.lang.Object
-
- org.eclipse.jetty.util.log.StacklessLogging
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class StacklessLogging extends java.lang.Object implements java.lang.AutoCloseableA try-with-resources compatible layer forhiding stacktraceswithin the scope of thetryblock when logging withStdErrLogimplementation.Use of other logging implementation cause no effect when using this class
Example:
try (StacklessLogging scope = new StacklessLogging(EventDriver.class,Noisy.class)) { doActionThatCausesStackTraces(); }
-
-
Constructor Summary
Constructors Constructor Description StacklessLogging(java.lang.Class<?>... classesToSquelch)StacklessLogging(Logger... logs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()
-
-
-
Constructor Detail
-
StacklessLogging
public StacklessLogging(java.lang.Class<?>... classesToSquelch)
-
StacklessLogging
public StacklessLogging(Logger... logs)
-
-