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

2014-01-27 Thread Aleix Pol
On Mon, Jan 20, 2014 at 11:40 PM, 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?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>Software Architect - Intel Open Source Technology Center
>   PGP/GPG: 0x6EF45358; fingerprint:
>   E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>

I certainly would welcome it, output is not manageable in the current state.

+1

Aleix


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

2014-01-27 Thread Aleix Pol
On Tue, Jan 21, 2014 at 12:54 PM, Kevin Krammer  wrote:

> On Monday, 2014-01-20, 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.
>
> What does "that carry it" mean? Is that a runtime detect or does the
> distribution have to build Qt with a certain dependency?
>
> I.e. if a distribution has journald (probably as part of a systemd
> package),
> does Qt depend on that package or is that something Qt will discover during
> runtime?
>
> > KDE applications are the largest users of qDebug today.
>
> This does not affect kDebug() or does it?
>
> Cheers,
> Kevin
> --
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring
>

KDebug is gone for KF5 (or deprecated in KDE4Support).

Aleix


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

2014-01-24 Thread Thiago Macieira
On sexta-feira, 24 de janeiro de 2014 10:07:34, David Faure wrote:
> I don't want to prevent progress, but what I'm missing in this thread is a 
> reason WHY to use journald. Filtering? grep can do that too, on ~/.xsession-
> errors.

One of the first patches to Qt that MeeGo carried was an option to move all Qt 
warnings to the syslog. That helped device developers find out which 
applications were producing warnings and needed fixing.

This is exactly why Jolla did the same patch for journald. That patch has been 
accepted into Qt.

The question I brought up is whether we should enable it by default. Also note 
that all applications connected to a tty will still get output fed to a 
stderr, so developers will see their warnings.

Querying journald is apparently easier than grepping stderr. Systemd also 
causes the stderr of applications it launches to be redirected into journald, 
but it loses a bit of information there -- you can't tell one program from a 
child process it launched.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
  PGP/GPG: 0x6EF45358; fingerprint:
  E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358


signature.asc
Description: This is a digitally signed message part.


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

2014-01-24 Thread Kevin Krammer
On Friday, 2014-01-24, 10:07:34, David Faure wrote:

> Kevin Krammer: kDebug uses qDebug.

Yes, my mistake. I was thinking in Qt4/KDE4 term where we have runtime 
configurable output behavior through kdebugdialog (IIRC).

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


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

2014-01-24 Thread Bernd Steinhauser
À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


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

2014-01-24 Thread David Faure
On Monday 20 January 2014 23:51:45 Martin Sandsmark wrote:
> On Mon, Jan 20, 2014 at 02:40:17PM -0800, Thiago Macieira wrote:
> > If we changed the default, it would mean ~/.xsession-errors would probably
> > become rather empty. Is that ok for KDE?
> 
> Considering how poor discoverability ~/.xsession-errors has (it took me many
> years until I discovered it) I think this is a really good idea.

What about the discoverability of the journald commands? "Discoverability" is 
really no argument for or against IMHO, since it's equally bad for both. 
I wouldn't have known how to get the logs from journald without reading the 
rest of this thread.

I don't want to prevent progress, but what I'm missing in this thread is a 
reason WHY to use journald. Filtering? grep can do that too, on ~/.xsession-
errors.

So yeah to me it just sounds like a way to fill up the '/' partition - 
possibly at the expense of other users; on a system with quotas for each 
user's home it would kind of break the idea of the quota, no?

Kevin Krammer: kDebug uses qDebug.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



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

2014-01-21 Thread Thiago Macieira
On terça-feira, 21 de janeiro de 2014 13:55:15, Sebastian Kügler wrote:
> One thing that may concern me is how to clean the system from debugging
> messages then. Sometimes applications go rogue on qDebug() (recent example
> the message from QPainter in Qt5, which has just been fixed), so the
> journal will end up pretty big, and also in the home directory.
> 
> I like how it's easy to delete all that spam with just one file. I would not
> quite like it to end up on my / partition, since that one is usually pretty
> small, and it can prevent the system from booting when the journal is
> filled up.

Most people don't know how to clean ~/.xsession-errors either. The best and 
easiest way to clean it is to log out and then log in again. Deleting the file 
is *not* enough, since it stays existing until the last application using it 
exits.

The correct way to shrink the file while running is:

echo > ~/.xsession-errors

But no, I don't know how to clean the journal log. That's a good question.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
  PGP/GPG: 0x6EF45358; fingerprint:
  E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358


signature.asc
Description: This is a digitally signed message part.


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

2014-01-21 Thread Matthias Klumpp
2014/1/21 Thiago Macieira :
> On terça-feira, 21 de janeiro de 2014 13:55:15, Sebastian Kügler wrote:
>> One thing that may concern me is how to clean the system from debugging
>> messages then. Sometimes applications go rogue on qDebug() (recent example
>> the message from QPainter in Qt5, which has just been fixed), so the
>> journal will end up pretty big, and also in the home directory.
>>
>> I like how it's easy to delete all that spam with just one file. I would not
>> quite like it to end up on my / partition, since that one is usually pretty
>> small, and it can prevent the system from booting when the journal is
>> filled up.
>
> Most people don't know how to clean ~/.xsession-errors either. The best and
> easiest way to clean it is to log out and then log in again. Deleting the file
> is *not* enough, since it stays existing until the last application using it
> exits.
>
> The correct way to shrink the file while running is:
>
> echo > ~/.xsession-errors
>
> But no, I don't know how to clean the journal log. That's a good question.
You could use the journald configuration to set the journal to an
exact/relative size (by default it takes 10% of the disk space).
A hardcore method to clean it would be
 find /var/log/journal -name "*.journal~" -exec rm {} \;
which should wipe the whole journal (caution, I never tried that!)
Cheers,
Matthias

-- 
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/


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

2014-01-21 Thread Thiago Macieira
On terça-feira, 21 de janeiro de 2014 02:15:59, Francesco R. wrote:
> Il 20/01/2014 23:40, Thiago Macieira ha scritto:
> > 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?
> 
> what will happen to system without journald (or systemd)?

Obviously Qt can't link to the systemd / journald libraries if they aren't 
there.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
  PGP/GPG: 0x6EF45358; fingerprint:
  E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358


signature.asc
Description: This is a digitally signed message part.


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

2014-01-21 Thread Thomas Lübking

On Dienstag, 21. Januar 2014 13:55:15 CEST, Sebastian Kügler wrote:

One thing that may concern me is how to clean the system from debugging 
messages then. Sometimes applications go rogue on qDebug()


What - from multiple bug reports and personal observation - can make journald 
going rogue itself anybody knows whether it's fixed in this regard (esp. 
compressing equal messages into one and a counter?)

Cheers,
Thomas


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

2014-01-21 Thread Àlex Fiestas
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


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

2014-01-21 Thread Sebastian Kügler
On Monday, January 20, 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?

One thing that may concern me is how to clean the system from debugging 
messages then. Sometimes applications go rogue on qDebug() (recent example the 
message from QPainter in Qt5, which has just been fixed), so the journal will 
end up pretty big, and also in the home directory.

I like how it's easy to delete all that spam with just one file. I would not 
quite like it to end up on my / partition, since that one is usually pretty 
small, and it can prevent the system from booting when the journal is filled 
up.

I'm not objecting, but the above questions concern my systems. Answers to how 
this could be done nicely are appreciated.

Cheers,
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


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

2014-01-21 Thread Francesco R.
Il 20/01/2014 23:40, Thiago Macieira ha scritto:
> 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?
>
what will happen to system without journald (or systemd)?


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

2014-01-21 Thread Kevin Krammer
On Monday, 2014-01-20, 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.

What does "that carry it" mean? Is that a runtime detect or does the 
distribution have to build Qt with a certain dependency?

I.e. if a distribution has journald (probably as part of a systemd package), 
does Qt depend on that package or is that something Qt will discover during 
runtime?

> KDE applications are the largest users of qDebug today.

This does not affect kDebug() or does it?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring


signature.asc
Description: This is a digitally signed message part.


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

2014-01-21 Thread Michael Jansen
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 think for distributions this is ok. But for developers .xsession-errors 
sometimes gets pretty big (just look at your own :) ). Which should not be a 
problem if there is a simple way to stop qt forwarding those messages to 
journalctl and get stuff back to .xsession-errors. Or there is a good 
documented alternative way using journalctl features reaching similar results.

Mike


-- 
Michael Jansen
http://michael-jansen.biz


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

2014-01-21 Thread Matthias Klumpp
2014/1/21 Martin Gräßlin :
> 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 like this +1
That would be pretty awesome, especially because journalctl has some
nice filtering capabilities. As long as it can be disabled by people
not using the journal (or don't want these things in their syslog if
the journal forwards them), I also don't think anyone could complain
about it :-)
Cheers,
Matthias

-- 
Debian Developer | Freedesktop-Developer
I welcome VSRE emails. See http://vsre.info/


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

2014-01-20 Thread Martin Gräßlin
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 like this +1

--
Martin Gräßlin


signature.asc
Description: This is a digitally signed message part.


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

2014-01-20 Thread Martin Sandsmark
On Mon, Jan 20, 2014 at 02:40:17PM -0800, Thiago Macieira wrote:
> If we changed the default, it would mean ~/.xsession-errors would probably 
> become rather empty. Is that ok for KDE?

Considering how poor discoverability ~/.xsession-errors has (it took me many
years until I discovered it) I think this is a really good idea.

It would also be nice to see a KDE/Qt UI frontend to journald eventually.

-- 
Martin Sandsmark