public interface ThreadFactory
Appenders create a background thread (via factory) at the same time that they
create the logwriter (also via factory), and pass the latter to the former. In
normal operation they'll use DefaultThreadFactory. However, tests may
instead use an factory that doesn't actually create a thread (so all operations
happen inline) or use some other configuration.
To handle unexpected thread death, the appender must provide an uncaught exception handler. A typical handler logs what happens and then shuts down the appender(the assumption is that recoverable exceptions will be handled).
| Modifier and Type | Method and Description |
|---|---|
void |
startWriterThread(LogWriter writer,
Thread.UncaughtExceptionHandler exceptionHandler) |
void startWriterThread(LogWriter writer, Thread.UncaughtExceptionHandler exceptionHandler)
Copyright © 2023. All rights reserved.