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 int |
Section |
static String |
SectionFoot |
static String |
SectionHead |
static String |
SectionWord |
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 LogStat.Stat |
buildStat(String log,
long from,
Collection<? extends LogStat.Word> keys,
String suffix,
int preview,
int section) |
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) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
Collection<? extends LogStat.Word> keys) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
int section,
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,
int section,
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,
int section,
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,
int section,
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,
int preview,
LogStat.Word... keys) |
static @NotNull LogStat.Stat |
stat(String log,
long from,
int preview,
String... keys) |
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 String SectionHead
public static final String SectionWord
public static final String SectionFoot
public static final int Preview
public static final int Section
@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)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, int section, String... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keyword in utf8preview - preview lines after matched keysection - section size of intended lines@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)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, int section, byte[]... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keyword in bytespreview - preview lines after matched keysection - section size of intended lines@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)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, int section, LogStat.Word... keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keywordpreview - preview lines after matched keysection - section size of intended lines@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)
@NotNull public static @NotNull LogStat.Stat stat(String log, long from, int preview, int section, Collection<? extends LogStat.Word> keys)
log - the log filefrom - Start byte, negative means start at the endkeys - keywordpreview - preview lines after matched keysection - section size of intended linespublic 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 LogStat.Stat buildStat(String log, long from, Collection<? extends LogStat.Word> keys, String suffix, int preview, int section) throws IOException
IOExceptionpublic static void main(String[] args)
Copyright © 2024. All rights reserved.