public class XLogStreamer extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
XLogStreamer.FileInfo
File along with the modified time which will be used to sort later.
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.Pattern |
gzTimePattern
This pattern matches the end of a gzip filename to have a format like "-YYYY-MM-dd-HH.gz" with capturing groups for each part
of the date
|
| Constructor and Description |
|---|
XLogStreamer(XLogFilter logFilter,
java.lang.String logPath,
java.lang.String logFile,
long logRotationSecs) |
| Modifier and Type | Method and Description |
|---|---|
java.io.BufferedReader |
makeReader(java.util.Date startTime,
java.util.Date endTime) |
void |
streamLog(java.io.Writer writer,
java.util.Date startTime,
java.util.Date endTime,
int bufferLen)
Gets the files that are modified between startTime and endTime in the given logPath and streams the log after
applying the filters.
|
public static final java.util.regex.Pattern gzTimePattern
public XLogStreamer(XLogFilter logFilter, java.lang.String logPath, java.lang.String logFile, long logRotationSecs)
public void streamLog(java.io.Writer writer, java.util.Date startTime, java.util.Date endTime, int bufferLen) throws java.io.IOException
writer - startTime - endTime - java.io.IOExceptionpublic java.io.BufferedReader makeReader(java.util.Date startTime, java.util.Date endTime) throws java.io.IOException
java.io.IOExceptionCopyright © 2017 Apache Software Foundation. All Rights Reserved.