Package com.logviewer.formats
Class AbstractPatternLogFormat
java.lang.Object
com.logviewer.formats.AbstractPatternLogFormat
- All Implemented Interfaces:
LogFormat
- Direct Known Subclasses:
Log4jLogFormat,LogbackLogFormat,NginxLogFormat
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.logviewer.data2.LogFormat
LogFormat.FieldDescriptor -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPatternLogFormat(String pattern) AbstractPatternLogFormat(String[] patterns) -
Method Summary
Modifier and TypeMethodDescriptionaddCustomLevels(List<String> customLevels) protected String[]protected voidprotected FieldSetprotected abstract Stringfinal StringString[]booleanvoidloadGlobalConfig(org.springframework.core.env.Environment env) protected static voidmergeMessageFields(List<LvLayoutNode> nodes) protected abstract LvLayoutNode[]parseLayout(String pattern) setCharset(Charset charset) voidvalidate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logviewer.data2.LogFormat
getFieldIndexByName
-
Field Details
-
SOURCE_FILE_PATTERN
- See Also:
-
METHOD_PATTERN
- See Also:
-
-
Constructor Details
-
AbstractPatternLogFormat
-
AbstractPatternLogFormat
-
-
Method Details
-
getCharset
- Specified by:
getCharsetin interfaceLogFormat
-
getLocale
-
hasFullDate
public boolean hasFullDate()- Specified by:
hasFullDatein interfaceLogFormat- Returns:
trueif log entry contains a date.- See Also:
-
setCharset
-
setLocale
-
clearTemporaryState
protected void clearTemporaryState() -
getPattern
-
getPatterns
-
getFormatName
-
getHumanReadableString
- Specified by:
getHumanReadableStringin interfaceLogFormat
-
getCustomLevels
-
allLogLevels
-
addCustomLevels
-
loadGlobalConfig
public void loadGlobalConfig(org.springframework.core.env.Environment env) - Specified by:
loadGlobalConfigin interfaceLogFormat
-
createReader
- Specified by:
createReaderin interfaceLogFormat
-
getFields
-
getDelegate
-
parseLayout
protected abstract LvLayoutNode[] parseLayout(@NonNull String pattern) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
validate
- Specified by:
validatein interfaceLogFormat- Throws:
IllegalArgumentException
-
mergeMessageFields
-