|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
com.jivesoftware.base.log.RotatingFileHandler
public class RotatingFileHandler
This is a basic Output log target that writes to rotating files. Based off the apache logkit RotatingFileHandler written by Peter Donald, Stephen McConnell, and Bernard Huber
Constructor Summary | |
---|---|
RotatingFileHandler(java.util.logging.Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
Construct RotatingFileHandler object. |
Method Summary | |
---|---|
void |
close()
Shutdown target. |
void |
flush()
|
protected java.io.File |
getFile()
Retrieve file associated with target. |
protected void |
openFile()
Open underlying file and allocate resources. |
void |
publish(java.util.logging.LogRecord logRecord)
Output the log message, and check if rotation is needed. |
void |
rotate()
|
protected void |
setFile(java.io.File file,
boolean append)
Set the file for this target. |
protected void |
shutdownWriter()
Shutdown output stream. |
void |
write(java.lang.String s)
|
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 |
Constructor Detail |
---|
public RotatingFileHandler(java.util.logging.Formatter formatter, RotateStrategy rotateStrategy, FileStrategy fileStrategy) throws java.io.IOException
formatter
- Formatter to be used
java.io.IOException
Method Detail |
---|
public void rotate() throws java.io.IOException
java.io.IOException
public void publish(java.util.logging.LogRecord logRecord)
publish
in class java.util.logging.Handler
public void flush()
flush
in class java.util.logging.Handler
protected void setFile(java.io.File file, boolean append) throws java.io.IOException
file
- the file to write toappend
- true if file is to be appended to, false otherwise
java.io.IOException
- if directories can not be created or file can not be openedprotected java.io.File getFile()
protected void openFile() throws java.io.IOException
java.io.IOException
public void close()
close
in class java.util.logging.Handler
protected void shutdownWriter()
public void write(java.lang.String s)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |