Separate logging categories for KF5 & KF6?
Closed, ResolvedPublic

Description

Qt uses the same environment variables and configuration files for Qt5 and Qt6:

  • configdir/QtProject/qtlogging.ini
  • QT_LOGGING_CONF
  • QT_LOGGING_RULES

See https://doc.qt.io/qt-5/qloggingcategory.html & https://doc.qt.io/qt-6/qloggingcategory.html

Both Qt5 and Qt6 share an unversioned category prefix "qt.".

The KF Logging Policy uses for the Category Naming Patterns the unversioned prefix"kf.", following Qt's "qt." example.

As result on systems with both KF5 and KF6 the logging control cannot be done separately when it comes to env variables and config files

Then though KDEinstallDirs provides separate kdebugsettings data folders, "qlogging-categories5" for Qt5/KF5 and "qlogging-categories6" for Qt6/KF6. Currently KF5 and KF6 install the unversioned categories files into the respective folders.

Questions:

  1. How will kdebugsettings be able to map things onto the unversioned Qt configuration files, from the different versioned sources?
  2. For console logging of processes with subprocesses that can be both Qt5/KF5 or Qt6/KF6, would people want to see which library version a log entry is from (unless people start to modify the logging output to prepend e.g. the binary name, using QT_MESSAGE_PATTERN)?
kossebau created this task.Apr 13 2023, 3:04 PM
alex closed this task as Resolved.Jul 18 2023, 1:59 PM
alex claimed this task.
alex added a subscriber: alex.

We decided on the KF6 weekly some time ago against this. I confirmed this on the in-person meeting at Akademy.