This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Simple journald viewer plasmoid

Tags: None
(comma "," separated)
Aiwendil
Registered Member
Posts
1
Karma
0

Simple journald viewer plasmoid

Sun Jun 11, 2017 1:27 pm
Hope this is the right place to post this...if not, sorry.

Not sure if interesting for anyone but I made a small plasmoid to display journald log messages on the desktop.

This is pretty much completely untested on any other computer than my own..just as warning.

At the moment it doesn't do much more than displaying time, priority, command and message of a journald entry. It's possible to filter user and system entries (But no other filtering like by priority). That's what I needed. I wouldn't mind adding a few more features if there is interest but to tell the truth I doubt anyone else than me will use this. And for me it does exactly what I need. And I for sure don't plan to turn this into a full fledged journald log viewer...it's more meant as a quick glance widget for what is going on.

Pictures: http://wstaw.org/m/2017/06/11/JournalViewerShot1.png / http://wstaw.org/m/2017/06/11/JournalViewerShot2.png

Gitlab link: https://gitlab.com/Aiwendil/JournalViewer

Known issues:

- dragging the sliders sometimes doesn't resize the height of a row correctly. I even know why...just right now if I see "binding loop detected" one more time I am going to run amok so this will have to wait until I find the motivation to deal with qml layout again. I hate frontends ;)
- No icon, I misuse the utilities-log-viewer icon right now. And to tell the truth, there is not much of a chance that I will ever be able to come up with an icon.
- needs a relog after installing. Really not sure why but curious to find out. At first glance looks like a Qt cache issue and not knowing about the plugin. Most likely I just forgot something.

Unknown issues: ;)

- Yeah, it will be funny to find out what happens if journald rotates the logfiles. Theoretically I think it should work fine...practically no way that works on my first attempt.
- Drawing/Updating speed of qml is a real issue if too many log messages arrive at a time. I limited the number of displayed recent log messages to a max of 100 what works fine on my computer. With 1000 I easily managed to bring plasmashell down with a

while true
echo 'hello' | systemd-cat
end

Lessons Learned:

- Do NOT use QDebug()s that are triggered on new journald messages in a plasmashell process.
- I will not get a friend of journald and its docs. (Okay, that is not completely true, on first glance the docs are very good but it's the undocumented special cases that make it painful)


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]