Package thredds.logs
Class LogReader
- java.lang.Object
-
- thredds.logs.LogReader
-
public class LogReader extends Object
Superclass to read TDS logs- Since:
- Apr 10, 2008
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLogReader.Closurestatic classLogReader.DateFilterstatic classLogReader.ErrorOnlyFilterstatic classLogReader.FilterNoopstatic classLogReader.IpFilterstatic classLogReader.Logstatic interfaceLogReader.LogFilterstatic interfaceLogReader.LogParserstatic classLogReader.Stats
-
Constructor Summary
Constructors Constructor Description LogReader(LogReader.LogParser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreadAll(File dir, FileFilter ff, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat)Read all the files in a directory and process them.voidscanLogFile(File file, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat)Read a log file.
-
-
-
Constructor Detail
-
LogReader
public LogReader(LogReader.LogParser parser)
-
-
Method Detail
-
readAll
public void readAll(File dir, FileFilter ff, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat) throws IOException
Read all the files in a directory and process them. Files are sorted by filename.- Parameters:
dir- read from this directoryff- files must pass this filter (may be null)closure- send each Log to this closurelogf- filter out these Logs (may be null)stat- accumulate statistics (may be null)- Throws:
IOException- on read error
-
scanLogFile
public void scanLogFile(File file, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat) throws IOException
Read a log file.- Parameters:
file- file to readclosure- send each Log to this closurelogf- filter out these Logs (may be null)stat- accumulate statistics (may be null)- Throws:
IOException- on read error
-
-