@Service public class SubstitutionTactic extends Object implements Tactic
Tactic
for the SubstitutionTactic.| Modifier and Type | Field and Description |
|---|---|
private static String |
DATE_FORMAT_STRING
Pattern of date and time of SubstitutionTactic, for example
for example 29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1... |
private static String |
ONE_SPACE |
private static Pattern |
PATTERN_DATE
|
private static String |
PATTERN_DATE_STRING
RegEx of a date in a
SubstitutionTactic log line,
for example 29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1... |
private static String |
PIPE |
private SimpleDateFormat |
simpleDateFormat |
private static int |
THREAD_NAME_INDEX |
| Constructor and Description |
|---|
SubstitutionTactic() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsDate(String line) |
Date |
findDate(File file) |
Date |
findDate(String line) |
Date |
findDate(String line,
NodeFile nodeFile) |
private String |
findDateString(String line)
Parse a
Date from a log line. |
String |
findThreadName(String line)
Examples:
05.11.2018 08:37:08.100|https-jsse-nio-15443-exec-10|DEBUG|...
|
String |
getShortName() |
boolean |
identifyApplication(String line,
LogBufferedReader logBufferedReader) |
private boolean |
isPipeSeparator(String line) |
private Date |
parseDateFromLine(String line)
Parse a
Date from a log line. |
String |
parseDateStingFromLine(String line) |
private static final String PATTERN_DATE_STRING
SubstitutionTactic log line,
for example 29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1...
private static final Pattern PATTERN_DATE
private static final String DATE_FORMAT_STRING
Pattern of date and time of SubstitutionTactic, for example
for example 29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1...
private static final String ONE_SPACE
private static final int THREAD_NAME_INDEX
private static final String PIPE
private final SimpleDateFormat simpleDateFormat
@Inject public SubstitutionTactic()
public boolean containsDate(String line)
containsDate in interface Tacticpublic String parseDateStingFromLine(String line)
parseDateStingFromLine in interface Tacticprivate Date parseDateFromLine(String line)
Date from a log line.line - for example
29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1...for
SubstitutionTacticDate, for example 13.04.2018 07:27:41.462
or 'null' if the line is null or the date cannot be found.private String findDateString(String line)
Date from a log line.line - for example
29.09.2018 22:53:42.494|https-jsse-nio-15443-exec-1...for
SubstitutionTacticDate, for example 13.04.2018 07:27:41.462 or 'null' if the line is 'null' or the date cannot be found.public String findThreadName(String line)
05.11.2018 08:37:08.100|https-jsse-nio-15443-exec-10|DEBUG|...
19.12.2018 06:17:56.761 http-nio-8080-exec-305 INFO [1212121]...
findThreadName in interface Tacticprivate boolean isPipeSeparator(String line)
public String getShortName()
getShortName in interface Tacticpublic boolean identifyApplication(String line, LogBufferedReader logBufferedReader)
identifyApplication in interface TacticCopyright © 2019. All rights reserved.