public class LogStat extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LogStat.Stat |
static class |
LogStat.Word |
| Modifier and Type | Field and Description |
|---|---|
static int |
Preview |
static String |
Suffix |
| Constructor and Description |
|---|
LogStat() |
| Modifier and Type | Method and Description |
|---|---|
static LogStat.Stat |
buildStat(String log,
long from,
Collection<? extends LogStat.Word> keys)
Directly obtain statistics, which may be overwritten when logs are output
at the same time within the same millisecond of the same log.
|
static LogStat.Stat |
buildStat(String log,
long from,
Collection<? extends LogStat.Word> keys,
String suffix) |
static LogStat.Stat |
buildStat(String log,
long from,
Collection<? extends LogStat.Word> keys,
String suffix,
int preview) |
static List<String> |
clean(String log,
int days)
Clear N days old scanned files
|
static List<String> |
clean(String log,
int days,
String suffix) |
static void |
main(String[] args) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
byte[]... keys) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
Collection<? extends LogStat.Word> keys) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
byte[]... keys)
Directly obtain statistics, which may be overwritten when logs are output
at the same time within the same millisecond of the same log.
|
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
Collection<? extends LogStat.Word> keys)
Directly obtain statistics, which may be overwritten when logs are output
at the same time within the same millisecond of the same log.
|
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
LogStat.Word... keys)
Directly obtain statistics, which may be overwritten when logs are output
at the same time within the same millisecond of the same log.
|
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
String... keys)
Directly obtain statistics, which may be overwritten when logs are output
at the same time within the same millisecond of the same log.
|
static @NotNull LogStat.Stat |
stat(String log,
long from,
LogStat.Word... keys) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
String... keys) |
public static final String Suffix
public static final int Preview
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, String... keys)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, String... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keyword in utf8preview - preview lines after matched key@NotNull public static @NotNull LogStat.Stat stat(String log, long from, byte[]... keys)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, byte[]... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keyword in bytespreview - preview lines after matched key@NotNull public static @NotNull LogStat.Stat stat(String log, long from, LogStat.Word... keys)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, LogStat.Word... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keywordpreview - preview lines after matched key@NotNull public static @NotNull LogStat.Stat stat(String log, long from, Collection<? extends LogStat.Word> keys)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, Collection<? extends LogStat.Word> keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keywordpreview - preview lines after matched keypublic static List<String> clean(String log, int days)
log - the log filedays - Days, less than zero, treated as zeropublic static LogStat.Stat buildStat(String log, long from, Collection<? extends LogStat.Word> keys) throws IOException
log - the log filefrom - Start byte, negative means start at the endkeys - keywordIOExceptionpublic static LogStat.Stat buildStat(String log, long from, Collection<? extends LogStat.Word> keys, String suffix) throws IOException
IOExceptionpublic static LogStat.Stat buildStat(String log, long from, Collection<? extends LogStat.Word> keys, String suffix, int preview) throws IOException
IOExceptionpublic static void main(String[] args)
Copyright © 2024. All rights reserved.