Re: chatty akonadi apps
Kevin Krammer <[email protected]>
| Newsgroups | gmane.comp.kde.users.pim |
|---|---|
| Organization | KDE |
| Message-ID | <1720267.z0XbLuVeSD@persephone> |
On Saturday, 2014-11-08, 17:31:56, René J.V. Bertin wrote:
> On Saturday November 08 2014 16:45:09 Kevin Krammer wrote:
> >Right.
> >Since this is Akonadiserver, it currently uses unconfigurable log since
> >that was not available in Qt4.
> >
> >It can be built without that though.
>
> How? Why is that not a setting that can be controlled through
> akonadiserverrc?
Code wise this looks like that:
#ifndef QT_NO_DEBUG_OUTPUT
QDebug akDebug();
#else
inline QNoDebug akDebug() {
return QNoDebug();
}
#endif
Basically the same thing Qt is doing for qDebug().
Configurable logging requires some infrastructure, e.g. centrally accessible
settings, which have not been available in Qt4 but are in Qt5.
One could potentially patch Akonadi Server with something primitive like a
global variable, but that is unlikely to be accepted into the upstream code
base.
The compile time switch is mostly there to have debug logging in developer
builds and disable it in production builds (this has the advantage of not
incurring any overhead).
Not entirely sure why it is built with that enabled when packages by
distributions.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
_______________________________________________
KDE PIM users mailing list
Subscription management: https://mail.kde.org/mailman/listinfo/kdepim-users
signature.asc
(application/pgp-signature, 173 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iD8DBQBUXkmMnKMhG6pzZJIRAkJnAJ0feZUr8ngRUqPoFR2FruP6GaXoUQCfTv8J FLyJ2Q15wipZ1jKs5Bpxmlw= =z+jP -----END PGP SIGNATURE-----