JetBrains / ideolog

Interactive viewer for '.log' files.
MIT License
252 stars 54 forks source link

Plugin does nothing #110

Closed Vampire closed 6 months ago

Vampire commented 3 years ago

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:

2020-12-18 12:13:48,260 [1429590]  ERROR - rationStore.ComponentStoreImpl - Cannot init  component state [Plugin: com.intellij.ideolog]
com.intellij.diagnostic.PluginException: Cannot init  component state [Plugin: com.intellij.ideolog]
        at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:116)
        at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:50)
        at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:358)
        at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:58)
        at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:41)
        at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:115)
        at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:69)
        at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:411)
        at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:394)
        at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
        at com.intellij.ideolog.highlighting.settings.LogHighlightingSettingsStore$Companion.getInstance(LogHighlightingSettingsStore.kt:16)
        at com.intellij.ideolog.highlighting.settings.LogHighlightingConfigurable.<init>(LogHighlightingConfigurable.kt:17)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at com.intellij.util.pico.InstantiatingComponentAdapter.newInstance(CachingConstructorInjectionComponentAdapter.java:294)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:88)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:66)
        at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:48)
        at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:103)
        at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:97)
        at com.intellij.openapi.options.ConfigurableEP$ClassProducer.createElement(ConfigurableEP.java:400)
        at com.intellij.openapi.options.ConfigurableEP.createConfigurable(ConfigurableEP.java:309)
        at com.intellij.openapi.options.ex.ConfigurableWrapper.createConfigurable(ConfigurableWrapper.java:47)
        at com.intellij.openapi.options.ex.ConfigurableWrapper.getConfigurable(ConfigurableWrapper.java:109)
        at com.intellij.openapi.options.ex.ConfigurableWrapper.cast(ConfigurableWrapper.java:84)
        at com.intellij.openapi.options.ex.ConfigurableCardPanel.prepare(ConfigurableCardPanel.java:38)
        at com.intellij.openapi.options.ex.ConfigurableCardPanel.prepare(ConfigurableCardPanel.java:29)
        at com.intellij.ui.CardLayoutPanel.lambda$selectLater$1(CardLayoutPanel.java:114)
        at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
        at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
        at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false Toolkit.getEventQueue()=com.intellij.ide.IdeEventQueue@3b8b616f
Current thread: Thread[ApplicationImpl pooled thread 81,4,Idea Thread Group] 100182345
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 89830724
        at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1057)
        at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1039)
        at com.intellij.ideolog.highlighting.settings.LogHighlightingSettingsStore.fireListeners(LogHighlightingSettingsStore.kt:76)
        at com.intellij.ideolog.highlighting.settings.LogHighlightingSettingsStore.loadState(LogHighlightingSettingsStore.kt:103)
        at com.intellij.ideolog.highlighting.settings.LogHighlightingSettingsStore.loadState(LogHighlightingSettingsStore.kt:14)
        at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:438)
        at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:373)
        at com.intellij.configurationStore.ComponentStoreImpl.initPersistenceStateComponent(ComponentStoreImpl.kt:138)
        at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:103)
        ... 36 more
2020-12-18 12:13:48,262 [1429592]  ERROR - rationStore.ComponentStoreImpl - IntelliJ IDEA 2020.1.4  Build #IU-201.8743.12
2020-12-18 12:13:48,262 [1429592]  ERROR - rationStore.ComponentStoreImpl - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-12-18 12:13:48,262 [1429592]  ERROR - rationStore.ComponentStoreImpl - OS: Windows 10
2020-12-18 12:13:48,262 [1429592]  ERROR - rationStore.ComponentStoreImpl - Plugin to blame: Ideolog version: 201.0.22.0
Karmalakas commented 3 years 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

bytefluxio commented 3 years ago

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)

TeamCity-Dev-Build-Log.log

https://user-images.githubusercontent.com/29196542/119356947-4948cc00-bca7-11eb-9f20-5b4666f9dd3e.mp4

bytefluxio commented 3 years ago

@Vampire Your log only has 4 lines. The bug is that you need at least 6 lines for it to work... :(

Vampire commented 3 years ago

Why do you think I only have 4 log lines? Besides that this sounds like a arbitrary strange limit.

bytefluxio commented 3 years ago

It's still a bug. Just not as completely as you thought. I suffer from it too.

Vampire commented 3 years ago

But again, what makes you think I only have 4 log lines? I had very much more.

onitake commented 2 years ago

@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.
sunr00f commented 1 year ago

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

gavenkoa commented 1 year ago

Built-in feature is better: https://www.jetbrains.com/help/idea/setting-log-options.html

Vampire commented 1 year ago

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.

gavenkoa commented 1 year ago

@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.

AlexRNL commented 8 months ago

Any chances of this being fixed at some point?

ArtemKar123 commented 6 months ago

Fixed in #165. Will be released in the next version. Thanks for your feedback!