public class LogReader extends Object
Modifier and Type | Class and 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 and Description |
---|
LogReader(LogReader.LogParser parser) |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
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.
|
public LogReader(LogReader.LogParser parser)
public void readAll(File dir, FileFilter ff, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat) throws IOException
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 statitistics (may be null)IOException
- on read errorpublic void scanLogFile(File file, LogReader.Closure closure, LogReader.LogFilter logf, LogReader.Stats stat) throws IOException
file
- file to readclosure
- send each Log to this closurelogf
- filter out these Logs (may be null)stat
- accumulate statitistics (may be null)IOException
- on read errorpublic static void main(String[] args) throws IOException
IOException
Copyright © 1999–2014 UCAR/Unidata. All rights reserved.