Processing Multiple Log FilesProcessing Multiple Log Files
By default polliwog will process a single log file.

It is possible to configure polliwog to process multiple log files in succession. To do this you need to provide a log file iterator. A log file iterator should be an object that implements interface: org.polliwog.utils.LogFileIterator.

You should then add the following to the property to the properties file:
<property id="logFileIteratorClass"
  <description>Will iterate over a number of log files.</description>
  <value>[full classname of your implementation]</value>
Basic Log File Iterator
A basic log file iterator implementation is provided with polliwog. It is implemented by class: org.polliwog.utils.BasicLogFileIterator. To make polliwog use this iterator you should add property:
to the properties file.

The basic log file iterator supports the following features:
  • Process all files from one or more directories
  • Process one or more files from any directory
  • Process log files accessible via http or https
  • Process rolling log files (based on the date embedded in the file/directory name)
  • Process zipped or gziped log files
The iterator is initialized by the xml file specified by property:
The xml file has the following elements/attributes:
Show the help for this table
log-file-iteratorYdir*, file*NONENONEThe root element.
dirNfile*log-file-iteratorpath(string,R), format(string,O), type(enum{date},O)Defines a directory that will contain log files. The path attribute specified the full path to the directory.

The format attribute should only be used when you want to provide a date in the directory/file name. If provided the type attribute should be: date indicating that the date format provided by External site, opens in new window SimpleDateFormat should be used. The format attribute should then contain the file name of the log files to process with format characters embedded to indicate the date. The iterator will then examine all files in the directory specified by the path attribute and compare the file name to the format specified, if it matches then the log file will be added for processing. The iterator will order the log files found from oldest to newest.

If any child file elements are specified then the content of the file element is appended to the path attribute and taken to be a file to be processed.
fileNNONEdir, log-file-iteratorpathWhen specified as a child of dir the content of the element is used to indicate the name of a file to be processed. When specified as a child of log-file-iterator the path attribute should be provided giving the full path/url to the log file.
Process all log files in a directory with a date in the file name.
<dir path="/home/mydir/logs"
     type="date" />
Process specific files in a directory.
<dir path="/home/mydir/logs">
Process a specific file.
<file path="/home/mydir/logs/server_access_2007_05_01.log" />
Process all files in directories with a date in the path.
<dir path="/home/mydir/logs"
     type="date" />