|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExceptionHandlingStrategyFactory
Interface for factories that create ExceptionHandlingStrategies to allow users to provide their own mechanism for handling the difficult problem of capturing the output of Throwable.printStacktrace() and turning it into logging events.
The default implementation is LogPerLineExceptionHandlingStrategyFactory which returns an
ExceptionHandlingStrategy that simply logs each line of the stack trace as a separate logging event.
| Method Summary | |
|---|---|
ExceptionHandlingStrategy |
makeExceptionHandlingStrategy(LogLevel logLevel,
PrintStream originalPrintStream)
This method will be called twice for each context that is sent to SLF4J, once each to return an ExceptionHandlingStrategy for the new System.out and System.err print streams.It is called with the LogLevel of the SLF4JPrintStream and the original System output
PrintStream that is being replaced, so that ExceptionHandlingStrategies can have direct access to
the console if they wish. |
| Method Detail |
|---|
ExceptionHandlingStrategy makeExceptionHandlingStrategy(LogLevel logLevel,
PrintStream originalPrintStream)
ExceptionHandlingStrategy for the new System.out and System.err print streams.LogLevel of the SLF4JPrintStream and the original System output
PrintStream that is being replaced, so that ExceptionHandlingStrategies can have direct access to
the console if they wish.
logLevel - The LogLevel of the parent PrintStream (by default INFO for System.out
and ERROR for System.err)originalPrintStream - The original System output PrintStream providing direct access to the console
ExceptionHandlingStrategy that will be called with each line of an Exception that is
printed using Throwable.printStacktrace() or Throwable.printStacktrace(System.out)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||