Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most functionality not working properly right now #197

Open
Vampire opened this issue Nov 12, 2024 · 2 comments
Open

Most functionality not working properly right now #197

Vampire opened this issue Nov 12, 2024 · 2 comments
Labels

Comments

@Vampire
Copy link

Vampire commented Nov 12, 2024

As I got an answer of another issue of mine, I gave the plugin another try.
But somehow it does not really work as expected.
As a test I created a simple log file that adheres to the built-in "Pipe-separated" log format and as I do not get the "Log format not recognized" header I assume the log format per-se is recognized.
If I replace all pipes, I get the header, so I'm also pretty sure the plugin is doing "something".
The log file I created consist of these lines:

00:00:34.633|INFO|com.example.Foo|message1
00:01:34.636|INFO|com.example.Bar|message2
00:02:34.638|INFO|com.example.Foo|message3
00:03:34.640|INFO|com.example.Bar|message1
00:04:34.641|INFO|com.example.Foo|message2
00:05:34.642|INFO|com.example.Bar|message3
00:06:34.643|INFO|com.example.Foo|message1
00:07:34.643|INFO|com.example.Bar|message2
00:08:34.644|INFO|com.example.Foo|message3
00:09:34.644|INFO|com.example.Bar|message1
00:10:34.645|INFO|com.example.Foo|message2
00:11:34.647|INFO|com.example.Bar|message3
00:12:34.649|INFO|com.example.Foo|message1
00:13:34.651|INFO|com.example.Bar|message2
00:14:34.651|WARN|com.example.Foo|message3
00:15:34.652|ERROR|com.example.Bar|message1
00:16:34.656|INFO|com.example.Foo|message2
00:17:34.657|INFO|com.example.Bar|message3
00:18:34.658|INFO|com.example.Foo|message1
00:19:34.658|INFO|com.example.Bar|message2
00:20:34.659|INFO|com.example.Foo|message3
00:21:34.660|INFO|com.example.Bar|message1
00:22:34.661|INFO|com.example.Foo|message2
00:23:34.662|INFO|com.example.Bar|message3
00:24:34.662|INFO|com.example.Foo|message1
00:25:34.664|INFO|com.example.Bar|message2
00:26:34.665|INFO|com.example.Foo|message3
00:27:34.666|INFO|com.example.Bar|message1
01:28:34.664|INFO|com.example.Foo|message2
02:29:34.665|INFO|com.example.Bar|message3

The error stripe is about the only thing that seems to work properly:
This is what I see:
image

So for example the lines are not painted in red, yellow, and green.

The "Hide lines ..." and "Show only lines ..." intentions also seem to work as intended.

But if I for example do "Toggle Time Highlighting" as @smirok showed in #159 I do not get different colors, but all in red and additionally the previous linebreak highlighted:
image

If I do "Highlight 'message2'" while having the caret on "message2", all lines containing that message are highlighted, but also including the previous linebreak:
image

If I do "Highlight this column" on a log level, all lines get the same highlighting except for the error line, and also the previous linebreak highlighted:
image

While testing further, it might just be an unlucky choice of colors that are very similar, because if I do it on the level, colors alternate but also are quite similar:
image

Doing "Highlight this column" on the last column does not work at all, like also all other column specific options like "Hide lines with ... in this field" and others, those options all are missing from the intention popup.

Doing "Jump to Source", jumps to a very strange log line that is not even similar to those dummy log messages.

Time highlight does also highlight the previous field separator or message start match (custom log format here):
image
image

If the log file is read-only due to the "Allow editing log files smaller than" setting, also all intention actions are not available. If I press Alt+Enter nothing happens, if I right-click and say "Show Context Actions" I only get a "No context actions available at this location" message.

So after writing all this, I think the main points are:

  • lines are not colored according to log level
  • Highlighting highlights the previous linebreak
  • Automatic highlight colors are often too similar
  • Time Highlighting does not show the advertised time distance
  • The last field does not have the field intentions
  • Jump to Source behaves strange
  • Time Highlighting as it does right now does not only highlight the time, but also highlights the preceding field separator
  • If the log file is read-only due to the "Allow editing log files smaller than" setting, also all intention actions are not available
@Vampire
Copy link
Author

Vampire commented Nov 12, 2024

Ah, I at least got the line text highlighting to work now, by changing the "Capture Group" from 1 to 0 in all three "Patterns".
But I also added "Show on stripe" to the warning pattern which now highlights the line, but on the error stripe it is still not shown. :-/

@smirok
Copy link
Contributor

smirok commented Nov 12, 2024

Hi @Vampire! Thank you for your feedback, it helps us to make Ideolog better.

I've updated documentation for both log format and highlighting pattern creation: https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats and https://github.com/JetBrains/ideolog/wiki/Highlighting-Patterns

Could you please let me know which IDE you use and which version of Ideolog you have?

I'm trying to reproduce it on the latest version of Ideolog:

  1. I use the same log file as you shared
  2. The default highlighting patterns fits perfectly for the log file
    image
  3. The error stripe is actually get broken
  4. The issue with incorrect background highlighting after the newline is a known issue, I'll investigate it further.
  5. The reason why you have only red "time highlighting" is the big difference between events (1 minute). Please find the example below with smaller distances between adjacent log events:
    image
  6. "Highlight this column" looks broken, I'll investigate it.
  7. Agree with you on color choices, I'll fix it.
  8. Highlighting on the last column is probably broken as well.
  9. "Jump to Source" is a bit of a magic, it could works only for log formats that contain "category" capture group (like IntelliJ IDEA logs or your log format), but probably even for them it doesn't work correctly.
  10. Time highlight does also highlight the previous field separator or message start match (custom log format here) - I'll discover it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants