Package com.polarion.platform.jobs
Interface ILogsCleanupJobUnit
- All Superinterfaces:
IJobUnit
This job will remove log files which are too old.
- Since:
- 3.3.1
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh
-
Field Summary
FieldsFields inherited from interface com.polarion.platform.jobs.IJobUnit
UNKNOWN_WORK_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setFilePatterns
(String... filePatterns) Required job parameter: log file patterns.void
setMaxFileAgeDays
(int age) Required job parameter: max age of log files (in days).Methods inherited from interface com.polarion.platform.jobs.IJobUnit
activate, getCreator, getJob, getLogger, getName, getPriority, getScope, getWorkLength, run, setJob, setLogger, setScope, setWorkDir
-
Field Details
-
JOB_NAME
- See Also:
-
-
Method Details
-
setMaxFileAgeDays
void setMaxFileAgeDays(int age) Required job parameter: max age of log files (in days).- Parameters:
age
- age in days
-
setFilePatterns
Required job parameter: log file patterns.File pattern has the form: _FOLDER_|_PATTERN_ (e.g. C:/Polarion/data/workspace/.metadata|log4j-[^2]*2). _FOLDER_ is where to find log files, _PATTERN_ is file name prefix regular expression. File name prefix is matched against all files in the folder, those who matched the same prefix are treated together - from this set all files which are older than
setMaxFileAgeDays(int)
are removed with the exception of the newest one which is always kept.- Parameters:
filePatterns
- file patterns
-