pentix / qjournalctl

A multi-platform, Qt-based frontend for systemd's journalctl command. Accepting local as well as remote (SSH) data sources.
GNU General Public License v3.0
166 stars 17 forks source link

Feature: Colorize filtered output #58

Closed alacasta closed 3 years ago

alacasta commented 4 years ago

What?

This contribution solves #56 .

The contribution is about parsing the output of the logging and show it based on the color selected when creating the filter.

To create a filter

image

Example

The following example, contains two filters (the ID of the device has been removed): image

alacasta commented 4 years ago

@pentix Can you please take a look to this? :)

alacasta commented 4 years ago

(note that i've reverted your changes to make the tool working on windows, but they have not been included in this PR)

pentix commented 4 years ago

That looks really cool, I'll take a look at it as soon as the Windows stuff runs smoothly. As this is a new feature it should be included in the next release, so I'm adding the v0.7 milestone to it.

alacasta commented 4 years ago

Reopening to enforce a newer CI cycle

alacasta commented 4 years ago

Definitively, something changed. Yesterday, it worked and no changes happen in this branch :(

Pleas, help @pentix! 🙏

pentix commented 3 years ago

Hi Asier!

I hope you're well! Sorry for my late answers, I did not forget your pull request but found very little time during the summer to work on my projects. I just wanted to let you know that I did not forget your work here and will try to get all the build system stuff done and merged, and then have a look at this.

Thank you!

pentix commented 3 years ago

Definitively, something changed. Yesterday, it worked and no changes happen in this branch :(

I couldn't quite figure out what changed, i.e. why it worked in the first build, however as you mentioned some of the Qt features this PR uses was introduced in Qt 5.10

Ubuntu (especially the LTS version that the CI uses) tends to lag behind, the package search shows that 5.9.5 is the current version supplied there.

It's the same as with the libssh dependency: To fully support this, a user would need to build the required libraries himself, and also to load and install the required header files, which is fine for the small libssh, but unfeasible for the giant Qt.

An option would be to let the build system decide whether these features are available, and compile them only if possible, i.e. if version(Qt) >= 5.10; But then, would it still be possible to have this feature somehow, i.e. with another coloring? And how would we need to update the build system for this to work on all 3 platforms?

I know that's unsatisfying, however if I straight up add Qt >= 5.10 as a dependency, there will be a lot of users telling me compilation doesn't work for them. (As this dependencies are dynamically linked on Linux, just providing a .deb doesn't work, since it will fail to load the correct Qt version on execution)