public class FileLogHandler extends LogHandlerImp
Zip file based implemention of LogHandler
. This LogHandler returns the specified log file (up to maximum of 5Mb)
compressed using the GZIP algorithm.
In the adapter configuration file this class is aliased as file-log-handler which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
FileLogHandler() |
Modifier and Type | Method and Description |
---|---|
void |
clean()
This deletes any files in the log directory older than the clean period.
|
java.lang.String |
getLogDirectory()
Get the directory used for logging.
|
java.lang.String |
getLogFile()
Return the filename that will be sent as part of the LogRequestEvent.
|
java.lang.Integer |
getPeriod()
Get the clean period.
|
void |
prepare()
Prepare for initialisation.
|
void |
setLogDirectory(java.lang.String dir)
Set the directory that is used for logging.
|
void |
setLogFile(java.lang.String s)
The filename that will be sent as part of any LogRequestEvent.
|
void |
setPeriod(java.lang.Integer days)
Set the cleaning period.
|
close, getUniqueId, init, setUniqueId, start, stop
public void clean() throws java.io.IOException
java.io.IOException
- if there was an error.LogHandler.clean()
public void setLogDirectory(java.lang.String dir)
dir
- the directory.public java.lang.String getLogDirectory()
public void setLogFile(java.lang.String s)
s
- the file.public java.lang.String getLogFile()
public void setPeriod(java.lang.Integer days)
days
- the cleaning period in days.public java.lang.Integer getPeriod()
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException