|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.hp.hpl.jena.util.LogFileHandler | +--com.hp.hpl.jena.util.AlternatingLogFileHandler
A log file handler which write the log to a number of files in a round robbin fashion.
This is a subclass of LogFileHandler, which instead of
writing all the log data to one file, will write
numEntries
entries to one file, then the next
numEntries
to another, continuing until
numFiles
files have been written when it will start
again with the first file.
The files are written according to a pattern:
fileNameRoot[N].fileNameExt
This log file handler is useful for long term logging when the amount of log data generated is large, but only the latest entries are of interest.
Field Summary | |
static int |
DEFAULT_ENTRIES_PER_FILE
The default number of entries per file. |
static java.lang.String |
DEFAULT_FILE_NAME_EXT
The default extension part of the log file name. |
static java.lang.String |
DEFAULT_FILE_NAME_ROOT
The default root part of the log file name. |
static int |
DEFAULT_NUM_FILES
The default number of files. |
Fields inherited from class com.hp.hpl.jena.util.LogFileHandler |
FIELD_SEP |
Constructor Summary | |
AlternatingLogFileHandler()
Create an AlternatingLogFileHandler with a
default configuration. |
|
AlternatingLogFileHandler(java.lang.String fileNameRoot,
java.lang.String fileNameExt)
Create an AlternatingLogFileHandler with
a given root file name and extension. |
|
AlternatingLogFileHandler(java.lang.String fileNameRoot,
java.lang.String fileNameExt,
int numFiles,
int entriesPerFile)
Creates new AlternatingLogFileHandler with the specifed configuration. |
Method Summary | |
void |
publish(int level,
java.lang.String msg,
java.lang.String cls,
java.lang.String method,
java.lang.Throwable ex)
The same as LogFileHandler.publish(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable) |
Methods inherited from class com.hp.hpl.jena.util.LogFileHandler |
close |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String DEFAULT_FILE_NAME_ROOT
public static java.lang.String DEFAULT_FILE_NAME_EXT
public static int DEFAULT_NUM_FILES
public static int DEFAULT_ENTRIES_PER_FILE
Constructor Detail |
public AlternatingLogFileHandler() throws java.io.IOException
AlternatingLogFileHandler
with a
default configuration.java.io.IOException
- can occur creating the log filespublic AlternatingLogFileHandler(java.lang.String fileNameRoot, java.lang.String fileNameExt) throws java.io.IOException
AlternatingLogFileHandler
with
a given root file name and extension.fileNameRoot
- the root part of the log file namesfileNameExt
- the extension part of the filenamesjava.io.IOException
- can occur creating the filespublic AlternatingLogFileHandler(java.lang.String fileNameRoot, java.lang.String fileNameExt, int numFiles, int entriesPerFile) throws java.io.IOException
fileNameRoot
- the root part of the log file namesfileNameExt
- the extension part of the log file namesnumFiles
- the number of log files to useentriesPerFile
- the number of log entries in each filejava.io.IOException
- can occur creating the log fileMethod Detail |
public void publish(int level, java.lang.String msg, java.lang.String cls, java.lang.String method, java.lang.Throwable ex)
LogFileHandler.publish(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Throwable)
publish
in class LogFileHandler
com.hp.hpl.jena.util.LogFileHandler
level
- The log level that this message is published atmsg
- The log message to be published.cls
- Optional name of the class that originated the log request.method
- Optional name of the method that originated the log request.ex
- Optional throwable that triggered the log request.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |