Skip to content

Highlighting Patterns

Artem Karamyshev edited this page Jan 19, 2024 · 2 revisions

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. Should it match, the configured action is applied:

  • "Highlight line" - highlights the whole message with configured style
  • "Highlight field" - highlights the field (capture group) where the match occurred
  • "Highlight match" - highlights just the matched text

If multiple patterns match a field, 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.

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.

Known issues

There is no user-visible validation performed on patterns. If your pattern is invalid, it will simply be ignored.

Clone this wiki locally