|
JBoss Log Manager 1.4.1.Final | |||||||||
| 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
org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler
public class PeriodicSizeRotatingFileHandler
A file handler which rotates the log at a preset time interval or the size of the log.
The time interval is determined by the content of the suffix string which is passed in toPeriodicRotatingFileHandler.setSuffix(String).
The size interval is determined by the value passed in the setRotateSize(long).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler |
|---|
PeriodicRotatingFileHandler.Period |
| Field Summary |
|---|
| Fields inherited from class org.jboss.logmanager.handlers.WriterHandler |
|---|
outputLock |
| Fields inherited from class org.jboss.logmanager.ExtHandler |
|---|
handlers, handlersUpdater |
| Constructor Summary | |
|---|---|
PeriodicSizeRotatingFileHandler()
Default constructor. |
|
PeriodicSizeRotatingFileHandler(File file,
String suffix)
Construct a new instance with the given output file. |
|
PeriodicSizeRotatingFileHandler(File file,
String suffix,
boolean append)
Construct a new instance with the given output file and append setting. |
|
PeriodicSizeRotatingFileHandler(File file,
String suffix,
long rotateSize,
int maxBackupIndex)
Construct a new instance with the given output file. |
|
PeriodicSizeRotatingFileHandler(File file,
String suffix,
long rotateSize,
int maxBackupIndex,
boolean append)
Construct a new instance with the given output file. |
|
PeriodicSizeRotatingFileHandler(String fileName)
Construct a new instance with the given output file. |
|
PeriodicSizeRotatingFileHandler(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 |
setFile(File file)
Set the output file. |
void |
setMaxBackupIndex(int maxBackupIndex)
Set the maximum backup index (the number of log files to keep around). |
void |
setOutputStream(OutputStream outputStream)
Set the output stream to write to. |
void |
setRotateSize(long rotateSize)
Set the rotation size, in bytes. |
| Methods inherited from class org.jboss.logmanager.handlers.PeriodicRotatingFileHandler |
|---|
getNextSuffix, getTimeZone, setSuffix, setTimeZone |
| Methods inherited from class org.jboss.logmanager.handlers.FileHandler |
|---|
getFile, setAppend, setFileName |
| Methods inherited from class org.jboss.logmanager.handlers.OutputStreamHandler |
|---|
getEncoding, setEncoding, setWriter |
| Methods inherited from class org.jboss.logmanager.handlers.WriterHandler |
|---|
close, doPublish, flush, safeClose |
| Methods inherited from class org.jboss.logmanager.ExtHandler |
|---|
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, getHandlers, isAutoFlush, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect |
| Methods inherited from class java.util.logging.Handler |
|---|
getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PeriodicSizeRotatingFileHandler()
public PeriodicSizeRotatingFileHandler(String fileName)
throws FileNotFoundException
fileName - the file name
FileNotFoundException - if the file could not be found on open
public PeriodicSizeRotatingFileHandler(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 open
public PeriodicSizeRotatingFileHandler(File file,
String suffix)
throws FileNotFoundException
file - the filesuffix - the format suffix to use
FileNotFoundException - if the file could not be found on open
public PeriodicSizeRotatingFileHandler(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 open
public PeriodicSizeRotatingFileHandler(File file,
String suffix,
long rotateSize,
int maxBackupIndex)
throws FileNotFoundException
file - the filesuffix - the format suffix to userotateSize - the size the file should rotate atmaxBackupIndex - the maximum number of files to backup
FileNotFoundException - if the file could not be found on open
public PeriodicSizeRotatingFileHandler(File file,
String suffix,
long rotateSize,
int maxBackupIndex,
boolean append)
throws FileNotFoundException
file - the filesuffix - the format suffix to userotateSize - the size the file should rotate atmaxBackupIndex - the maximum number of files to backupappend - true to append, false to overwrite
FileNotFoundException - if the file could not be found on open| Method Detail |
|---|
public void setOutputStream(OutputStream outputStream)
OutputStreamHandler
setOutputStream in class OutputStreamHandleroutputStream - the new output stream or null for none
public void setFile(File file)
throws FileNotFoundException
FileHandler
setFile in class PeriodicRotatingFileHandlerfile - the file
FileNotFoundException - if an error occurs opening the filepublic void setRotateSize(long rotateSize)
rotateSize - the number of bytes before the log is rotatedpublic void setMaxBackupIndex(int maxBackupIndex)
maxBackupIndex - the maximum backup indexprotected void preWrite(ExtLogRecord record)
PeriodicRotatingFileHandler
preWrite in class PeriodicRotatingFileHandlerrecord - the record about to be logged
|
JBoss Log Manager 1.4.1.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||