|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.util.SimpleLogListener
org.jpos.util.RotateLogListener
org.jpos.util.DailyLogListener
public class DailyLogListener
Rotates log daily and compress the prevoius log.
| Nested Class Summary | |
|---|---|
protected class |
DailyLogListener.Compressor
|
| Nested classes/interfaces inherited from class org.jpos.util.RotateLogListener |
|---|
RotateLogListener.Rotate |
| Field Summary |
|---|
| Fields inherited from class org.jpos.util.RotateLogListener |
|---|
CHECK_INTERVAL, DEFAULT_MAXSIZE |
| Constructor Summary | |
|---|---|
DailyLogListener()
Creates a new instance of DailyLogListener |
|
| Method Summary | |
|---|---|
protected void |
checkSize()
|
protected void |
closeCompressedOutputStream(OutputStream os)
|
protected void |
compress(File logFile)
Hook method to optionally compress the file |
protected OutputStream |
getCompressedOutputStream(File f)
Hook method that creates an output stream that will compress the data. |
String |
getCompressedSuffix()
Getter for property compressedExt. |
int |
getCompressionBufferSize()
Getter for property compressionBufferSize. |
int |
getCompressionFormat()
Getter for property compressionFormat. |
protected Thread |
getCompressorThread(File f)
Hook method that creates a thread to compress the file f. |
DateFormat |
getDateFmt()
Getter for property dateFmt. |
String |
getLastDate()
Getter for property lastDate. |
String |
getPrefix()
Getter for property prefix. |
int |
getRotateCount()
Getter for property rotateCount. |
String |
getSuffix()
Getter for property suffix. |
protected void |
logDebugEx(String msg,
Throwable e)
|
void |
logRotate()
|
void |
setCompressedSuffix(String compressedSuffix)
Setter for property compressedExt. |
void |
setCompressionBufferSize(int compressionBufferSize)
Setter for property compressionBufferSize. |
void |
setCompressionFormat(int compressionFormat)
Setter for property compressionFormat. |
void |
setConfiguration(Configuration cfg)
Configure this RotateLogListener Properties: file base log filename [window] in seconds (default 0 - never rotate) [count] number of copies (default 0 == single copy) [maxsize] max log size in bytes (aprox) |
void |
setDateFmt(DateFormat dateFmt)
Setter for property dateFmt. |
void |
setLastDate(String lastDate)
Setter for property lastDate. |
void |
setPrefix(String prefix)
Setter for property prefix. |
void |
setRotateCount(int rotateCount)
Setter for property rotateCount. |
void |
setSuffix(String suffix)
Setter for property suffix. |
| Methods inherited from class org.jpos.util.RotateLogListener |
|---|
closeLogFile, destroy, log, logDebug, openLogFile |
| Methods inherited from class org.jpos.util.SimpleLogListener |
|---|
close, setPrintStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DailyLogListener()
| Method Detail |
|---|
public void setConfiguration(Configuration cfg)
throws ConfigurationException
RotateLogListener
setConfiguration in interface ConfigurablesetConfiguration in class RotateLogListenercfg - Configuration
ConfigurationException
public void logRotate()
throws IOException
logRotate in class RotateLogListenerIOExceptionpublic String getSuffix()
public void setSuffix(String suffix)
suffix - New value of property suffix.public String getPrefix()
public void setPrefix(String prefix)
prefix - New value of property prefix.public int getRotateCount()
public void setRotateCount(int rotateCount)
rotateCount - New value of property rotateCount.public DateFormat getDateFmt()
public void setDateFmt(DateFormat dateFmt)
dateFmt - New value of property dateFmt.public String getLastDate()
public void setLastDate(String lastDate)
lastDate - New value of property lastDate.public String getCompressedSuffix()
public void setCompressedSuffix(String compressedSuffix)
compressedSuffix - New value of property compressedExt.protected Thread getCompressorThread(File f)
f - the file name
protected OutputStream getCompressedOutputStream(File f)
throws IOException
f - the file name
IOException - on error
protected void closeCompressedOutputStream(OutputStream os)
throws IOException
IOException
protected void logDebugEx(String msg,
Throwable e)
public int getCompressionFormat()
public void setCompressionFormat(int compressionFormat)
compressionFormat - New value of property compressionFormat.public int getCompressionBufferSize()
public void setCompressionBufferSize(int compressionBufferSize)
compressionBufferSize - New value of property compressionBufferSize.protected void checkSize()
checkSize in class RotateLogListenerprotected void compress(File logFile)
logFile - the file name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||