Package com.logviewer.formats
Class RegexLogFormat
java.lang.Object
com.logviewer.formats.RegexLogFormat
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.logviewer.data2.LogFormat
LogFormat.FieldDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionRegexLogFormat(String regex, RegexLogFormat.RegexField... fields) RegexLogFormat(String regex, String datePattern, String dateFieldName, RegexLogFormat.RegexField... fields) -
Method Summary
Modifier and TypeMethodDescriptionstatic RegexLogFormat.RegexFieldstatic RegexLogFormat.RegexFieldbooleanbooleansetCharset(Charset charset) setDontAppendUnmatchedTextToLastField(boolean dontAppendUnmatchedTextToLastField) 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, loadGlobalConfig
-
Constructor Details
-
RegexLogFormat
-
RegexLogFormat
public RegexLogFormat(@NonNull String regex, @Nullable String datePattern, @Nullable String dateFieldName, RegexLogFormat.RegexField... fields)
-
-
Method Details
-
isDontAppendUnmatchedTextToLastField
public boolean isDontAppendUnmatchedTextToLastField() -
setDontAppendUnmatchedTextToLastField
public RegexLogFormat setDontAppendUnmatchedTextToLastField(boolean dontAppendUnmatchedTextToLastField) -
setCharset
-
setLocale
-
validate
- Specified by:
validatein interfaceLogFormat- Throws:
IllegalArgumentException
-
getHumanReadableString
- Specified by:
getHumanReadableStringin interfaceLogFormat
-
getDatePattern
-
createReader
- Specified by:
createReaderin interfaceLogFormat
-
getFields
-
getCharset
- Specified by:
getCharsetin interfaceLogFormat
-
getLocale
-
hasFullDate
public boolean hasFullDate()- Specified by:
hasFullDatein interfaceLogFormat- Returns:
trueif log entry contains a date.- See Also:
-
field
-
field
public static RegexLogFormat.RegexField field(@NonNull String name, @Nullable String type, @Nullable Integer groupIndex)
-