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 interface
LogReader.Closure
static class
LogReader.DateFilter
static class
LogReader.ErrorOnlyFilter
static class
LogReader.FilterNoop
static class
LogReader.IpFilter
static class
LogReader.Log
static interface
LogReader.LogFilter
static interface
LogReader.LogParser
static class
LogReader.Stats
-
Constructor Summary
Constructors Constructor Description LogReader(LogReader.LogParser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
readAll(File dir, FileFilter ff, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat)
Read all the files in a directory and process them.void
scanLogFile(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
-
-