Qt 5.3 to log all debug/warning/error messages to journald on systemd systems

Bernd Steinhauser linux at bernd-steinhauser.de
Thu Jan 23 23:33:25 GMT 2014


Àlex Fiestas wrote:

> On Monday 20 January 2014 14:40:17 Thiago Macieira wrote:
>> See subject. We're trying to decide whether we should enable journald by
>> default on Linux distributions that carry it. If we do, it means any
>> application that is not launched from a terminal would automatically
>> write to journald instead.
>> 
>> KDE applications are the largest users of qDebug today.
>> 
>> If we changed the default, it would mean ~/.xsession-errors would
>> probably become rather empty. Is that ok for KDE?
> 
> I have even thought on writing this myself... so a big +1
> 
> I'm really looking forward to be able to tell my users in bug reports
> something like:
> Prove the output from: journalctl /usr/bin/bluedevil-wizard :33
Hi,

I'm not a KDE Developer, so sorry for writing to this list, but I'm 
answering here, because this is almost exactly what I wanted to propose as a 
feature request on bugzilla (or via mail) recently.

First, I submitted a couple of bug request during the last few years, so I 
spent quite some time digging through .xsession-errors and this was always 
quite painful, because it's sometimes not very easy to find out which 
program caused which messages (most messages are prepended by the program 
name, but not all of them). Depending on how kde is built and set up, there 
can be *a lot* of information in that file and it can quite easily grow up 
to several hundreds of megabytes (sometimes without the user noticing).

Now with journalctl, this would be quite different. As Alex noted, filtering 
per app is possible, but also a lot of other filtering. With MaxLevelStore, 
debug information can normally filtered out and activated when trying to 
reproduce a problem (to avoid flooding the log, although that's not a huge 
problem for journald anyway), journald supports rotating logs due to size, 
so the used disk space can be controled much better than with .xsession-
errors (keep in mind that logs are very well compressed by a factor of 
40-50). That gets never rotated unless done manually, except, that it is 
cleaned on login.

So going even one step further than what Alex suggested: The bug report tool 
already shows a backtrace if a process crashed including a rating to show if 
it might be helpful or not. The same could be done with the logs.
When a program crashes, the tool could (based on the pid) get the output of 
that program since it was started (that should be quite easy to find out) 
and there could even be a rating if that log information might be helpful or 
not. I don't know if something like that is implemented in journald, but 
maybe a program could automatically gather debug information which might not 
be stored on the disk due to configuration? At least it might be an idea.

In the end, I think it would result in better bug reports (and therefore 
hopefully easier bug fixing).

Cheers,
Bernd




More information about the kde-core-devel mailing list