GNOME Bugzilla – Bug 784798
Logs should be able to list logs of a given executable
Last modified: 2018-05-22 13:05:31 UTC
I would like to be able to launch Logs from my application and list only logs related to it. For context: sometimes there are errors down the stack in Boxes, which cannot be handled by the application itself. I would like to point directly to the logs which might be related the problems. Manually, I often use journalctl EXE= to filter, and I think the results are quite convenient.
Created attachment 355332 [details] [review] Allow a single executable view Logs is so far unable to be launched with an specific application context. Although it is desirable that other applications would launch Logs listing only their specific journal entries. This patch makes it possible to pass an executable as a command line argument and present only logs related to that executable. This is achieved by the "_EXE=" parameter of journalctl.
This is a pretty useful feature ! Though, you can always select "Executable Path" as the journal field from the search popover to get the logs related to a executable.
Thanks for commenting. (In reply to Pranav Ganorkar from comment #2) > This is a pretty useful feature ! Though, you can always select "Executable > Path" as the journal field from the search popover to get the logs related > to a executable. right, but I would like to be able to filter them right from the command line (so my application can launch Logs itself). If this is a desirable feature, we could discuss whether using the _EXE filter sounds like a good idea, etc..
(In reply to Felipe Borges from comment #3) > Thanks for commenting. > > (In reply to Pranav Ganorkar from comment #2) > > This is a pretty useful feature ! Though, you can always select "Executable > > Path" as the journal field from the search popover to get the logs related > > to a executable. > > right, but I would like to be able to filter them right from the command > line (so my application can launch Logs itself). > > If this is a desirable feature, we could discuss whether using the _EXE > filter sounds like a good idea, etc.. Sounds good. It will be more convenient for those who want to launch Logs and see the expected result directly. But there are a few thing I'd like to address: 1. Use "gnome-logs _EXE=/path/to/executable" instead of "gnome-logs /path/to/executable" so that we can extend this feature to more desirable journal fields in the future. 2. Is it necessary to view those logs from previous boots? For some executables, there are too many logs. And it'll slow to load all of those logs.
(In reply to Jonathan Kang from comment #4) > Sounds good. It will be more convenient for those who want to launch Logs > and see > the expected result directly. > > But there are a few thing I'd like to address: > 1. Use "gnome-logs _EXE=/path/to/executable" instead of > "gnome-logs /path/to/executable" so that we can extend this feature to more > desirable journal fields in the future. > 2. Is it necessary to view those logs from previous boots? For some > executables, > there are too many logs. And it'll slow to load all of those logs. Great! I will address your requests in the following patches.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-logs/issues/10.