This class observes the given directory for the defined filename pattern.
Each time, when a new file with the defined pattern is created in the directory,
the class performs the specified ProcessingMethod (copy, move or delete) with the file.
Valid parameter:
usage: java -jar jar/Logarchiver.jar [-Help] [-SourceDirectory
]
[-SourceFileName ] [-TargetDirectory ] [-TargetFileName
] [-StdOut ] [-StdErr ] [-ProcessiongMode ]
[-Compression ] [-FileNameDate ] [-CleanupDays ]
[-CleanupCount ] [-ScanInterval ]
The Logarchiver observes the given SourceDirectory for new files with matching SourceFileNames.
All detected files are processed with the defined ProcessingMode.
-Help Print this message
-SourceDirectory The complete path of directory which should be
observed for new files
(Default: current directory)
-SourceFileName The name of the files, which should be processed.
It can contain following patterns:
any charackter
? single character
{..., ...} alternatives, e.g. : '*.{bak,tmp}'
(Default: '*.bak')
-TargetDirectory The complete path of directory to store the
processed files.
(Default: current directory)
-TargetFileName The target file name pattern of the processed
files.
The name consists fo two parts:
The java date/time pattern
... The fixed part of the name.
(Default: '_ods.log')
-StdOut The name of a fille to write standard output
stream.
-StdErr The name of a fille to write standard error
stream
-ProcessiongMode Defines the processing of the found files.
Valid values: copy, move, delete.
(Default: 'move')
-Compression Defines the compression for the found files.
Valid values: none, zip, gzip.
(Default: 'none')
-FileNameDate Defines how the date/time for the target filename
is created.
'current' uses the current date time.
'firstline' uses the time stamp from the first
line in the file.
(Default: 'current')
-CleanupDays Defines maximum age in day of the performed files
in the target directory.
-CleanupCount Defines maximum number of performed files in the
target directory.
-ScanInterval Defines the interval in seconds, to scan the
source directory for new files.
This may be necessary for shared drives.
To activate scanning, this parameter must be
greater than zero.