Bump the minimum logging category to Warning
AbandonedPublic

Authored by ltoscano on Aug 5 2018, 11:27 PM.

Details

Reviewers
dfaure
Summary

Also, break the long statements when needed, trying to follow
the style of the rest of the file.

Test Plan

It compiles.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1553
Build 1571: arc lint + arc unit
ltoscano created this revision.Aug 5 2018, 11:27 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 5 2018, 11:27 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ltoscano requested review of this revision.Aug 5 2018, 11:27 PM
dfaure requested changes to this revision.Aug 6 2018, 7:31 AM
dfaure added a subscriber: dfaure.

The correct default severity is actually Info. It allows (e.g. command-line programs) to show useful information (NOT debug output) to the user.

And ECMQtDeclareLoggingCategory.cmake takes care of making that the default already.

So why set it to Warning manually? Please explain the purpose of this patch.

This revision now requires changes to proceed.Aug 6 2018, 7:31 AM

I was under the impression that we were generally moving towards less chatty components by default, which included having Warning as minimum default level.

Unfortunately I don't remember anymore how I've got this idea, but I remember some patches setting the default level to Warning.
Is there then an official policy for Frameworks? And outside Frameworks?

It is true that Debian dropped the default qtlogging.ini file, but the first feedback from Fedora, for example, showed a strong desire of non-chatty at all.
If you think that this can be achieved by reevaluating all the current qCInfo to fit them to qCDebug, then I will write more specific patches (in this case, for example, kf5.kio.favicons is too chatty; another case is kf5.kservice.sycoca).

But an official policy would be needed at least for Frameworks.

dfaure added a comment.Aug 6 2018, 9:35 PM

I was under the impression that we were generally moving towards less chatty components by default, which included having Warning as minimum default level.
Unfortunately I don't remember anymore how I've got this idea, but I remember some patches setting the default level to Warning.
Is there then an official policy for Frameworks? And outside Frameworks?

ECM defines the policy: the default severity is Info.

Since qCInfo is very rarely used, Info or Warning doesn't make a huge difference per se, it's just more correct that info works out of the box.
AFAICS the patches that set the default level to Warning were back when the default was actually Debug (before the ECM macro, or for code that doesn't use it)...

It is true that Debian dropped the default qtlogging.ini file, but the first feedback from Fedora, for example, showed a strong desire of non-chatty at all.
If you think that this can be achieved by reevaluating all the current qCInfo to fit them to qCDebug, then I will write more specific patches (in this case, for example, kf5.kio.favicons is too chatty; another case is kf5.kservice.sycoca).

I don't see any qCInfo in KIO or in KService. I think you're still referring to qCDebugs or qDebugs there.
In fact the only qCInfo usage in KF5 is in plasma-framework (and it's indeed wrong, these look like debug statements, feel free to port them to qCDebug).

But an official policy would be needed at least for Frameworks.

I made it official in the ECM macro ;-)

ltoscano abandoned this revision.Aug 6 2018, 9:47 PM

Thanks for confirming. I will work on setting the default to Info for Frameworks components when it's not the case already, and tuning the debug messages.