|
JBoss Log Manager 1.2.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
org.jboss.logmanager.ExtHandler
org.jboss.logmanager.handlers.WriterHandler
public class WriterHandler
A handler which writes to any Writer
.
Field Summary | |
---|---|
protected Object |
outputLock
|
Fields inherited from class org.jboss.logmanager.ExtHandler |
---|
handlers, handlersUpdater |
Constructor Summary | |
---|---|
WriterHandler()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.jboss.logmanager.ExtHandler |
---|
addHandler, checkAccess, clearHandlers, getHandlers, isAutoFlush, publish, publish, removeHandler, setAutoFlush, setHandlers |
Methods inherited from class java.util.logging.Handler |
---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Object outputLock
Constructor Detail |
---|
public WriterHandler()
Method Detail |
---|
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 ExtHandler
record
- 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()
flush
in interface Flushable
flush
in class Handler
public void close() throws SecurityException
close
in interface Closeable
close
in class Handler
SecurityException
- if the caller does not have sufficient permissionprotected void safeClose(Closeable c)
c
- the resource
|
JBoss Log Manager 1.2.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |