Closed Vampire closed 6 months ago
I wonder if they even have any intention to fix plugin some time. Why even update it when it doesn't even work with their own idea.log file
I filed this to the PyCharm issue board, but was told to move it here - and I found this issue, which seems to be a duplicate. Anyway, here's my description:
I'm doing this in PyCharm, haven't tested the rest of the toolchain, but I think that PlugIn should be universal and other apps might run into the same issue.
What steps will reproduce the problem?
Install IdeoLog PlugIn
Set Allow editing log files smaller than to 5000 to be able to edit the example log file
Open a *.log file that is recognized by the plugin (I attached a TeamCity Log that I found on gist)
Delete all, but 6 lines of code - Highlighting and recognition should still work
Delete another line - log file highlighting / recognition broken (You can create another file from this one and should get the Popup "Can't recognize log format" - If you haven't clicked on the "dont show again" yet)
What is the expected result?
Log files/formats are recognized even with just one line of log
What happens instead?
Only log files/formats with at least 6 lines of logs are recognized
—-
Ideolog Version: 203.0.27.0 Apr. 07,2021
PyCharm Version: PyCharm 2021.1.1 (Professional Edition)
Build #PY-211.7142.13, built on April 21, 2021
Licensed to Robert Westman
Subscription is active until December 17, 2021.
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2038M
Cores: 4
Non-Bundled Plugins: IdeaVIM (0.67), com.intellij.ideolog (http://203.0.27.0), com.intellij.plugins.visualstudiokeymap (211.6432.7)
@Vampire Your log only has 4 lines. The bug is that you need at least 6 lines for it to work... :(
Why do you think I only have 4 log lines? Besides that this sounds like a arbitrary strange limit.
It's still a bug. Just not as completely as you thought. I suffer from it too.
But again, what makes you think I only have 4 log lines? I had very much more.
@Vampire You only have 4 log lines that match the pattern. The documentation at https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats says:
In order to detect the format of a log file, all existing patterns are matched against first 25 lines of a file.
The one with most matches gets selected, if the amount of matches is above 5.
Otherwise, a dumb per-line parser is used.
It may help others. I spent a lot of time trying to get my regex changes to take only to discover that I needed to restart the IDE to pick up my changes in the plugin configuration each time I iterated.
PyCharm - 2022.2.1 Pro - Build #PY-222.3739.56 - Mac arm64 Ideolog - 203.0.30.0
Built-in feature is better: https://www.jetbrains.com/help/idea/setting-log-options.html
Built-in feature is better
It is a totally different feature, so you simply cannot say either is better. That feature you refer to is to tail logs produced by run configurations live. This plugin is for nicely displaying log files.
@Vampire I wish JB decoupled or extracted built-in log viewer: it correctly parses stack traces + provides navigation to source code. Extra step of registering log file patterns make it built-in feature hidden behind of lots of clicks.
This plugin cannot navigate from stacktrace to source code out of the box, nor after following instructions in Wiki.
If you register .log files as Text then they will be handled by the "TextMate Bundle" plugin, which provides regex-based highlighting: the same what this plugin managed to do.
Any chances of this being fixed at some point?
Fixed in #165. Will be released in the next version. Thanks for your feedback!
I just found this plugin and wanted to give it a try, but there is nothing happening. I defined a custom log format that matches the format but still, nothing is happening. Maybe it is related to this from idea.log: