krasa / GrepConsole

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

Open closed logs with grep highlighting #188

Closed matshou closed 2 years ago

matshou commented 3 years ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like I would like to know if there is a way to open an existing (not open in stream) log file with grep and filter according to log levels. If this feature does not exist I would like to request it as IntelliJ lacks a good log viewer (or at least I am not aware of one).

Describe alternatives you've considered There is a comment on Stackoverflow that points to this feature on Grep console but I was not able to find it.

Additional context Post on Stackoverflow that provides more information about the request: https://stackoverflow.com/questions/20804756/intellij-idea-how-to-view-txt-files-with-the-features-of-console-stack-trace

krasa commented 3 years ago

image

krasa commented 3 years ago

I usually drag the file into this - but you need to enable showing of the whole toolbar image

matshou commented 3 years ago

I am aware of the Tail feature, which we can also do this by right clicking on the log file and Open in -> Tail in Console. However this doesn't give us the ability to filter lines by log level like this:

2021-02-12_185331

I am not sure if this feature comes from Grep or IntelliJ, but it seems almost essential to working with logs. In the screen above I am switching between the console and log file output which both have the same content, but the log file (lower panel in the screenshot above) tab has the feature to filter according to log level which appears in the form of a drop down menu that can be seen on the right side.

This feature can only be accessed as the log is being streamed and is not present when opening tail in console. It also has an annoying but that sometimes does not print anything to console if it is not focused the moment the stream starts piping, but other then that works as expected. I would like to see the same but only for log files that are not open in a stream.

krasa commented 3 years ago

this thing does it image

matshou commented 3 years ago

Yes, I know how to configure the logs so they are used by those panels. I was just wondering if that feature for filtering by log level comes from IntelliJ IDEA or the Grep plugin.

krasa commented 3 years ago

from IntelliJ IDEA

krasa commented 3 years ago

It also has an annoying but that sometimes does not print anything to console if it is not focused

https://youtrack.jetbrains.com/issue/IDEA-217617

krasa commented 2 years ago

btw Tail run configuration was added some time ago.