|
JBoss LogManager 1.1.0.CR6 | |||||||||
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
org.jboss.logmanager.handlers.OutputStreamHandler
org.jboss.logmanager.handlers.FileHandler
org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
public class PeriodicRotatingFileHandler
A file handler which rotates the log at a preset time interval. The interval is determined by the content of the
suffix string which is passed in to setSuffix(String)
.
Nested Class Summary | |
---|---|
static class |
PeriodicRotatingFileHandler.Period
Possible period values. |
Field Summary |
---|
Fields inherited from class org.jboss.logmanager.handlers.WriterHandler |
---|
outputLock |
Fields inherited from class org.jboss.logmanager.ExtHandler |
---|
handlers, handlersUpdater |
Constructor Summary | |
---|---|
PeriodicRotatingFileHandler()
Construct a new instance with no formatter and no output file. |
|
PeriodicRotatingFileHandler(File file,
String suffix)
Construct a new instance with the given output file. |
|
PeriodicRotatingFileHandler(File file,
String suffix,
boolean append)
Construct a new instance with the given output file and append setting. |
|
PeriodicRotatingFileHandler(String fileName)
Construct a new instance with the given output file. |
|
PeriodicRotatingFileHandler(String fileName,
boolean append)
Construct a new instance with the given output file and append setting. |
Method Summary | |
---|---|
protected void |
preWrite(ExtLogRecord record)
Execute any pre-write policy, such as file rotation. |
void |
setSuffix(String suffix)
Set the suffix string. |
Methods inherited from class org.jboss.logmanager.handlers.FileHandler |
---|
getFile, setAppend, setFile, setFileName |
Methods inherited from class org.jboss.logmanager.handlers.OutputStreamHandler |
---|
getEncoding, setEncoding, setOutputStream, setWriter |
Methods inherited from class org.jboss.logmanager.handlers.WriterHandler |
---|
close, doPublish, flush, safeClose |
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 |
---|
getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeriodicRotatingFileHandler()
public PeriodicRotatingFileHandler(String fileName) throws FileNotFoundException
fileName
- the file name
FileNotFoundException
- if the file could not be found on openpublic PeriodicRotatingFileHandler(String fileName, boolean append) throws FileNotFoundException
fileName
- the file nameappend
- true
to append, false
to overwrite
FileNotFoundException
- if the file could not be found on openpublic PeriodicRotatingFileHandler(File file, String suffix) throws FileNotFoundException
file
- the filesuffix
- the format suffix to use
FileNotFoundException
- if the file could not be found on openpublic PeriodicRotatingFileHandler(File file, String suffix, boolean append) throws FileNotFoundException
file
- the filesuffix
- the format suffix to useappend
- true
to append, false
to overwrite
FileNotFoundException
- if the file could not be found on openMethod Detail |
---|
protected void preWrite(ExtLogRecord record)
preWrite
in class WriterHandler
record
- the record about to be loggedpublic void setSuffix(String suffix) throws IllegalArgumentException
SimpleDateFormat
.
The period of the rotation is automatically calculated based on the suffix.
suffix
- the suffix
IllegalArgumentException
- if the suffix is not valid
|
JBoss LogManager 1.1.0.CR6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |