lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Filtering logs

Open bartekczyz opened this issue 6 years ago • 6 comments

Is your feature request related to a problem? Please describe. It's difficult to spot only certain logs at the moment. Currently I can | grep docker logs from the console, but this is impossible in lazydocker

Describe the solution you'd like It would be great to either have a menu with filter option or another panel with filter input so I can easily filter logs only containing certain string

bartekczyz avatar Jul 08 '19 12:07 bartekczyz

Totally agree,
This is also somewhat related to: #33

mjarkk avatar Jul 08 '19 12:07 mjarkk

worth noting that filtering logs based on a filter would be far easier than searching through logs as discussed in https://github.com/jesseduffield/lazydocker/issues/33, because we could just store the filter in state and loop through each of the view's ViewLines

jesseduffield avatar Jul 11 '19 13:07 jesseduffield

@jesseduffield I am willing to help, was thinking to have a go at this change, what do you think?

giorgioprevitera avatar Jul 11 '19 16:07 giorgioprevitera

We could use 2 different ways of filtering, 1 just for the logs and 1 for the main panel.
Ow and it would be nice if we could use regex for filtering in the logs.

mjarkk avatar Jul 11 '19 18:07 mjarkk

or, instead of filtering the logs via a config, the logs could be configured to be piped into another utility? For filtering, it would just be grep, but there's tools like https://github.com/brocode/fblog which reformats json logs into nice formats.

sangohan avatar Jul 20 '23 03:07 sangohan

Is there any progress on this or #33?

When developing a Rails app in Docker, it's useful to be able to use Rails.logger.info to output debugging info to the log, but there is enough in the log in development mode that you stand no chance of actually finding that line without the ability to filter or search the log…

unikitty37 avatar Jun 17 '24 11:06 unikitty37