public class WriterHandler extends ExtHandler
Writer.| Modifier and Type | Field and Description |
|---|---|
protected Object |
outputLock |
handlers, handlersUpdater| Constructor and Description |
|---|
WriterHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this logger.
|
protected void |
doPublish(ExtLogRecord record)
Do the actual work of publication; the record will have been filtered already.
|
void |
flush()
Flush this logger.
|
protected void |
preWrite(ExtLogRecord record)
Execute any pre-write policy, such as file rotation.
|
protected void |
safeClose(Closeable c)
Safely close the resource, reporting an error if the close fails.
|
void |
setWriter(Writer writer)
Set the writer.
|
addHandler, checkAccess, clearHandlers, getHandlers, isAutoFlush, publish, publish, removeHandler, setAutoFlush, setHandlersgetEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelprotected final Object outputLock
protected void doPublish(ExtLogRecord record)
autoFlush property is set to true; if this behavior is to be
preserved in a subclass then this method should be called after the record is physically written.doPublish in class ExtHandlerrecord - the log record to publishprotected void preWrite(ExtLogRecord record)
record - the record about to be loggedpublic void setWriter(Writer writer)
writer - the new writer, or null to disable loggingpublic void flush()
public void close()
throws SecurityException
close in interface Closeableclose in interface AutoCloseableclose in class HandlerSecurityException - if the caller does not have sufficient permissionprotected void safeClose(Closeable c)
c - the resourceCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.