public class QueueingAppender extends Object implements AccessLogAppender
appender
enqueueing log entries into a
LinkedBlockingQueue
and using a secondary, separate Thread
to forward them to a configured nested appender
.Constructor and Description |
---|
QueueingAppender(AccessLogAppender appender)
Create a new
QueueingAppender instance enqueueing log entries
into a LinkedBlockingQueue and dequeueing them using a secondary
separate Thread . |
Modifier and Type | Method and Description |
---|---|
void |
append(String accessLogEntry)
Append the specified access log entry.
|
void |
close()
Close any underlying resource owned by this appender.
|
public QueueingAppender(AccessLogAppender appender)
QueueingAppender
instance enqueueing log entries
into a LinkedBlockingQueue
and dequeueing them using a secondary
separate Thread
.public void append(String accessLogEntry) throws IOException
AccessLogAppender
append
in interface AccessLogAppender
accessLogEntry
- The String
value of the data to be append
in the access log.IOException
- If an I/O error occurred appending to the log.public void close() throws IOException
AccessLogAppender
close
in interface Closeable
close
in interface AutoCloseable
close
in interface AccessLogAppender
IOException
Copyright © 2015 Oracle Corporation. All rights reserved.