Package org.eclipse.jetty.util.log
Class StacklessLogging
- java.lang.Object
-
- org.eclipse.jetty.util.log.StacklessLogging
-
- All Implemented Interfaces:
AutoCloseable
public class StacklessLogging extends Object implements AutoCloseable
A 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(Class<?>... classesToSquelch)StacklessLogging(Logger... logs)
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-