krasa / GrepConsole

IntelliJ plugin - https://plugins.jetbrains.com/plugin/7125
Apache License 2.0
437 stars 57 forks source link

Inconsistent highlighting #132

Closed piotr-dobrogost closed 5 years ago

piotr-dobrogost commented 5 years ago

Below are 9 consecutive entries cut out from a log file. I wanted to highlight phrase user: so I used this phrase as an expression in Console Grep. However the phrase was highlighted only in entries 5 and 8. I get similar inconsistent results with other expressions. What could be the reason?

[2018-11-19 11:18:21.958212+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:DEBUG src:1299@comp.base.view]
 Template "html_templates/page.fiole.html" rendered

[2018-11-19 11:18:21.961938+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:DEBUG src:179@comp.base.context]
 Saving session (sess=I0000eb6xhrbasPYXgxxLc4bkrNN8)

[2018-11-19 11:18:21.971150+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:INFO src:205@comp.base.log.handler]
 Starting writer thread for "app-benchmark.log"

[2018-11-19 11:18:21.973129+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:INFO src:186@comp.base.log.handler]
 Starting file watcher for "app-benchmark.log"

[2018-11-19 11:18:21.975707+01:00 req_id:- req:- ua_id:- sess:- user:- ip:- pid:27941 thr:7f53f9ffb700 busy:- level:DEBUG src:392@comp.base.log.handler]
 Waiting for inotify event on file /home/piotr/projects/app/var/log/app-benchmark.log (fd=31)

[2018-11-19 11:18:21.979730+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:INFO src:205@comp.base.log.handler]
 Starting writer thread for "app-business.log"

[2018-11-19 11:18:21.983221+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:1 level:INFO src:186@comp.base.log.handler]
 Starting file watcher for "app-business.log"

[2018-11-19 11:18:21.991112+01:00 req_id:- req:- ua_id:- sess:- user:- ip:- pid:27941 thr:7f53f8ff9700 busy:- level:DEBUG src:392@comp.base.log.handler]
 Waiting for inotify event on file /home/piotr/projects/app/var/log/app-business.log (fd=33)

[2018-11-19 11:18:21.991448+01:00 req_id:1ULsqUQaxhIi9eTyMJQGfqKX2 req:get@app/ ua_id:d0LKbEPsxxsoMGDw9pktfLVDXSXLLww sess:I0000eb6xhrbasPYXgxxLc4bkrNN8 user:me@some.corp@ ip:127.0.0.1 pid:27941 thr:7f548f9dc080 busy:0 level:DEBUG src:81@comp.base.log.debug]
 HTTP response headers for GET /app/:

Grep Console Version: 8.5.162.000.1

PyCharm 2018.2.3 (Professional Edition) Build #PY-182.4323.49, built on September 4, 2018 JRE: 1.8.0_152-release-1248-b8 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.19.2-300.fc29.x86_64

piotr-dobrogost commented 5 years ago

This is due to Match only first N characters on each line being set to the value of 120 (which is too small in this case).