JetBrains ideolog highlights plug-in configuration


This plug-in can be used in most ides of JetBrains, such as pycharm idea. For example, there are many third-party libraries in python that can highlight the output of the log console, but the log written to the file cannot be highlighted. This plug-in is to solve this problem

usage method:

  1. Click preference — > plugins — > search ideogo — > click Install

JetBrains ideolog highlights plug-in configuration

  1. If the log is not highlighted properly

    Note: you need to master the basic usage of regular expressions + read the configuration method

Configuration method:

Since version 0.3.0, the plug-in supports custom log formats

If the log cannot be highlighted, please upgrade the plug-in to the latest version first

You need to set two Java regular expressions and a time format

1. Message pattern:

It should include time, severity, category and message capture group. If these are not included in the custom log format, they can be ignored

If there are other, such as thread ID, it can also be summarized as capture group

2. Message start pattern:

Match the header at the beginning of log information, that is, the opening of each line of log

Note: you need to add “^” at the beginning to ensure that multiple lines match correctly

3. Time format:

The time format needs to be filled in to ensure normal highlighting

4. Apply message pattern to all message lines:

If the log format is fixed, ignoring this option can improve the performance of multi line log highlighting

5. Hightlight Patterns:

Highlight when matched to the previous capture groups

The style can be set

Highlight line-Highlight the entire message using the configured style

Highlight all lines

Highlight field”-Highlight the subdivision where the match occurred (capture group)

Capture group content highlighting

Highlight match-Currently not working. Highlight only matching text

Matching text highlighting


Highlighted rendering:

JetBrains ideolog highlights plug-in configuration

The log information is simple:

2020-10-19 20:08:54 success
2020-10-19 20:08:54 | error | error
2020-10-19 20:08:54 | debug | inspection

Time | log category | log information

Corresponding regular expression:


Log start:


This is the three capture groups that match:

JetBrains ideolog highlights plug-in configuration

Now fill in the settings according to the matched content

JetBrains ideolog highlights plug-in configuration

JetBrains ideolog highlights plug-in configuration
Matching rule:

Regular matching expressions can be written for complex logs, and the colors and display methods support customization. Here, I stole a lazy and directly wrote the name of the log level




JetBrains ideolog highlights plug-in configuration

set up

The matching rule contains rows with error

Hightlignt line highlights the entire log

Bold bold font bold

Foregroup font color is red

JetBrains ideolog highlights plug-in configuration

Show the results again:

JetBrains ideolog highlights plug-in configuration

Highlight completion according to the level

Plug in document address:

Author: Qi Mingyang
Source: Jianshu
The copyright belongs to the author. For commercial reprint, please contact the author for authorization, and for non-commercial reprint, please indicate the source.