JetBrains / ideolog

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

Custom log format with newlines not detected? #163

Open rklec opened 9 months ago

rklec commented 9 months ago

STR

I have this log (also with more entries) that is a multi-line log:

[2023-10-06 09:44:53 Debug]
Response:
Direction: Incoming
Request-Id: 16b34bdd-bla-bla
Status code: 500

There are more entries like this (or you can just duplicate this one), so https://github.com/JetBrains/ideolog/issues/110#issuecomment-847054388 should not be the cause here.

Format

grafik

Also verified the RegEx via built-in search: grafik

What happens

When opening the *.log file it always shows the log as not recognized. grafik

What should happen

Recognize log

https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats suggests at several places that newlines are supported:

This pattern is applied only to visible log lines, so it may be somewhat bulky and slow. In this pattern, '.' also matches newline by default. This is done for ease of matching multi-line messages.

System

JetBrains Rider 2023.2.2 Build #RD-232.9921.83, built on September 24, 2023


Runtime version: 17.0.8+7-b1000.22 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10.0 .NET Core v7.0.7 x64 (Server GC) GC: G1 Young Generation, G1 Old Generation Memory: 4070M Cores: 12 Registry: ide.experimental.ui=true vcs.empty.toolwindow.show=false database.show.search.tab=false ide.new.project.model.index.case.sensitivity=true

Non-Bundled Plugins: com.github.lppedd.idea-conventional-commit (0.22.0) testlinker2-rider (2023.2.2) de.femtopedia.diffplugin (2.1.11) fluentassertions-rider (2023.2.0) nsubstitutecomplete-rider (1.10.0) com.intellij.ideolog (222.1.0.0) cognitivecomplexity-rider (2023.2.0) com.intellij.plugin.adernov.powershell (2.2.0) me.seclerp.rider.plugins.efcore (232.1.0) com.intellij.ml.llm (232.9826) com.microsoft.vso.idea (1.162.2) zielu.gittoolbox (500.0.21+222) mobi.hsz.idea.gitignore (4.5.1) izhangzhihao.rainbow.brackets.lite (1.0.1)

LLynx commented 8 months ago

Thanks for your great research and analysis! I too can observe the same behavior on RubyMine 2023.2.5, Ideolog 222.1.0.0

My approach was to color all contiguous lines of an error message in a Rails log file. I tested and tried the corresponding regex here: https://regexr.com/7n2ct