Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public abstract class QueuedHandler extends Handler
An implementation of Handler that queues log records and handles
them in the background. Two actions are taken for each record, each in a
separate background process. The first writes the System.err
with a high priority. The second is an implementation-defined logging method.
The log records are processed in the order received, regardless of level.
Defaults to using ErrorPrinterFormatter.
ErrorPrinterFormatter| Modifier | Constructor and Description |
|---|---|
protected |
QueuedHandler(String consoleExecutorThreadName,
String customExecutorThreadName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
doCustomLogging(Formatter formatter,
LogRecord record,
String fullReport)
This is called in a background Thread.
|
void |
flush() |
void |
publish(LogRecord record) |
protected abstract boolean |
useCustomLogging(LogRecord record)
The log record will only be queued when this returns
true. |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic void close()
throws SecurityException
close in class HandlerSecurityExceptionprotected abstract boolean useCustomLogging(LogRecord record)
true.protected abstract void doCustomLogging(Formatter formatter, LogRecord record, String fullReport)
formatter - the formatter at the time the record was queuedrecord - the queued recordfullReport - the complete message generated by the formatter before
the record was queued. The message is generated before
so it can have accurate thread and time information.Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.