cz.cuni.amis.utils
Class LogFilter

java.lang.Object
  extended by cz.cuni.amis.utils.LogFilter

public class LogFilter
extends java.lang.Object

Simple way how to filter your log files...


Constructor Summary
LogFilter(java.io.File source, java.io.File destination, java.util.regex.Pattern[] accept, java.util.regex.Pattern[] remove)
          Opens 'source', writes to 'destination'.
 
Method Summary
 void filter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFilter

public LogFilter(java.io.File source,
                 java.io.File destination,
                 java.util.regex.Pattern[] accept,
                 java.util.regex.Pattern[] remove)
Opens 'source', writes to 'destination'.

Every single line from 'source' is matched against 'accept'. If some pattern matches the line, it goes to 'destination'.

If not, it is matched against 'remove'. If some pattern matches the line, it is discarded.

If no pattern matches, the line goes to 'destination'.

Parameters:
source -
destination -
accept -
remove -
Method Detail

filter

public void filter()
            throws java.io.IOException
Throws:
java.io.IOException