-
Notifications
You must be signed in to change notification settings - Fork 57
Highlighting Patterns
Highlighting patterns (shown under "Patterns" in settings) allow you to customize the way your log is highlighted.
Each highlighting pattern consists of Java regular expression pattern and action to be applied if it matches.
The pattern is applied to capture groups from Log Format that was detected for the file. Make sure the parsing pattern is successfully recognized, otherwise the proper highlighting isn't guaranteed.
The "Pattern" determines a log event piece to highlight.
Please note that the pattern is applicable only within particular capture groups from log format. It's impossible to match pattern against multiple capture group at the same time.
There are 3 available actions to be applied:
- "Highlight line" - highlights the whole log event with configured style
- "Highlight field" - highlights only the field (capture group) where the match occurred
- "Highlight match" - highlights all occurrences of the matched text
If multiple patterns match a log event, they are applied in the order of actions indicated above (line, then field, then match). If multiple patterns for the same action match, the last one is applied. This way, it's possible to highlight both whole line and a field in it with different colors.
If "Any" is selected, the highlighting pattern will be applied to all recognized log files.
Specify the log format to improve highlighting performance.
If you don't have a capture group for highlighting pattern or you want to apply the pattern for every capture group, select 0.
Specify the capture group to improve highlighting performance if it's possible
You can configure the foreground and background colors for highlighting, bold or italic font styles (for multi-line messages, these will be applied only to the first line), or add a mark to error stripe (scrollbar).
The three bundled patterns highlight messages according to their severity, additionally showing errors in bold and on error stripe.
There is no user-visible validation performed on patterns. If your pattern is invalid, it will simply be ignored.