forked from quickshell/quickshell
core/log: track default logging categories
Fixes a bug in fb37be7
which ignored default logging categories due to
skipping QLoggingRegistry's filter.
This commit is contained in:
parent
5d7e07508a
commit
3d594e16dd
68 changed files with 212 additions and 79 deletions
|
@ -14,9 +14,10 @@
|
|||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/generation.hpp"
|
||||
#include "../../core/logcat.hpp"
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logGreetd, "quickshell.service.greetd");
|
||||
QS_LOGGING_CATEGORY(logGreetd, "quickshell.service.greetd");
|
||||
}
|
||||
|
||||
QString GreetdState::toString(GreetdState::Enum value) {
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
#include "dbus_player.h"
|
||||
#include "dbus_player_app.h"
|
||||
|
@ -23,7 +24,7 @@ using namespace qs::dbus;
|
|||
namespace qs::service::mpris {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logMprisPlayer, "quickshell.service.mp.player", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logMprisPlayer, "quickshell.service.mp.player", QtWarningMsg);
|
||||
}
|
||||
|
||||
QString MprisPlaybackState::toString(MprisPlaybackState::Enum status) {
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
#include <qobject.h>
|
||||
#include <qqmllist.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/model.hpp"
|
||||
#include "player.hpp"
|
||||
|
||||
namespace qs::service::mpris {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logMprisWatcher, "quickshell.service.mpris.watcher", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logMprisWatcher, "quickshell.service.mpris.watcher", QtWarningMsg);
|
||||
}
|
||||
|
||||
MprisWatcher::MprisWatcher() {
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
#include <qsysinfo.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
|
||||
namespace qs::service::notifications {
|
||||
|
||||
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
||||
Q_DECLARE_LOGGING_CATEGORY(logNotifications); // server.cpp
|
||||
QS_DECLARE_LOGGING_CATEGORY(logNotifications); // server.cpp
|
||||
|
||||
QImage DBusNotificationImage::createImage() const {
|
||||
auto format = this->hasAlpha ? QImage::Format_RGBA8888 : QImage::Format_RGB888;
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
|
||||
#include "../../core/desktopentry.hpp"
|
||||
#include "../../core/iconimageprovider.hpp"
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "dbusimage.hpp"
|
||||
#include "server.hpp"
|
||||
|
||||
namespace qs::service::notifications {
|
||||
|
||||
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
||||
Q_DECLARE_LOGGING_CATEGORY(logNotifications); // server.cpp
|
||||
QS_DECLARE_LOGGING_CATEGORY(logNotifications); // server.cpp
|
||||
|
||||
QString NotificationUrgency::toString(NotificationUrgency::Enum value) {
|
||||
switch (value) {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/model.hpp"
|
||||
#include "dbus_notifications.h"
|
||||
#include "dbusimage.hpp"
|
||||
|
@ -20,7 +21,7 @@
|
|||
namespace qs::service::notifications {
|
||||
|
||||
// NOLINTNEXTLINE(misc-use-internal-linkage)
|
||||
Q_LOGGING_CATEGORY(logNotifications, "quickshell.service.notifications");
|
||||
QS_LOGGING_CATEGORY(logNotifications, "quickshell.service.notifications");
|
||||
|
||||
NotificationServer::NotificationServer() {
|
||||
qDBusRegisterMetaType<DBusNotificationImage>();
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "ipc.hpp"
|
||||
|
||||
Q_LOGGING_CATEGORY(logPam, "quickshell.service.pam", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logPam, "quickshell.service.pam", QtWarningMsg);
|
||||
|
||||
QString PamError::toString(PamError::Enum value) {
|
||||
switch (value) {
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "ipc.hpp"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logPam);
|
||||
QS_DECLARE_LOGGING_CATEGORY(logPam);
|
||||
|
||||
///! The result of an authentication.
|
||||
/// See @@PamContext.completed(s).
|
||||
|
|
|
@ -14,10 +14,12 @@
|
|||
#include <spa/utils/defs.h>
|
||||
#include <spa/utils/hook.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logLoop, "quickshell.service.pipewire.loop", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logLoop, "quickshell.service.pipewire.loop", QtWarningMsg);
|
||||
}
|
||||
|
||||
const pw_core_events PwCore::EVENTS = {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <spa/utils/json.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/util.hpp"
|
||||
#include "metadata.hpp"
|
||||
#include "node.hpp"
|
||||
|
@ -22,7 +23,7 @@ struct spa_json;
|
|||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logDefaults, "quickshell.service.pipewire.defaults", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logDefaults, "quickshell.service.pipewire.defaults", QtWarningMsg);
|
||||
}
|
||||
|
||||
PwDefaultTracker::PwDefaultTracker(PwRegistry* registry): registry(registry) {
|
||||
|
|
|
@ -20,13 +20,14 @@
|
|||
#include <spa/pod/vararg.h>
|
||||
#include <spa/utils/type.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "core.hpp"
|
||||
#include "node.hpp"
|
||||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logDevice, "quickshell.service.pipewire.device", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logDevice, "quickshell.service.pipewire.device", QtWarningMsg);
|
||||
}
|
||||
|
||||
// https://github.com/PipeWire/wireplumber/blob/895c1c7286e8809fad869059179e53ab39c807e9/modules/module-mixer-api.c#L397
|
||||
|
|
|
@ -10,12 +10,13 @@
|
|||
#include <qtypes.h>
|
||||
#include <spa/utils/dict.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "registry.hpp"
|
||||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logLink, "quickshell.service.pipewire.link", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logLink, "quickshell.service.pipewire.link", QtWarningMsg);
|
||||
}
|
||||
|
||||
QString PwLinkState::toString(Enum value) {
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
#include <qtypes.h>
|
||||
#include <spa/utils/dict.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "registry.hpp"
|
||||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logMeta, "quickshell.service.pipewire.metadata", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logMeta, "quickshell.service.pipewire.metadata", QtWarningMsg);
|
||||
}
|
||||
|
||||
void PwMetadata::bindHooks() {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/type.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "connection.hpp"
|
||||
#include "core.hpp"
|
||||
#include "device.hpp"
|
||||
|
@ -32,7 +33,7 @@
|
|||
namespace qs::service::pipewire {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logNode, "quickshell.service.pipewire.node", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logNode, "quickshell.service.pipewire.node", QtWarningMsg);
|
||||
}
|
||||
|
||||
QString PwAudioChannel::toString(Enum value) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "core.hpp"
|
||||
#include "device.hpp"
|
||||
#include "link.hpp"
|
||||
|
@ -23,7 +24,7 @@
|
|||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
Q_LOGGING_CATEGORY(logRegistry, "quickshell.service.pipewire.registry", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logRegistry, "quickshell.service.pipewire.registry", QtWarningMsg);
|
||||
|
||||
PwBindableObject::~PwBindableObject() {
|
||||
if (this->id != 0) {
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/util.hpp"
|
||||
#include "core.hpp"
|
||||
|
||||
namespace qs::service::pipewire {
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logRegistry);
|
||||
QS_DECLARE_LOGGING_CATEGORY(logRegistry);
|
||||
|
||||
class PwRegistry;
|
||||
class PwMetadata;
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "../../core/common.hpp"
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
#include "dbus_watcher_interface.h"
|
||||
#include "item.hpp"
|
||||
#include "watcher.hpp"
|
||||
|
||||
Q_LOGGING_CATEGORY(logStatusNotifierHost, "quickshell.service.sni.host", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logStatusNotifierHost, "quickshell.service.sni.host", QtWarningMsg);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
#include <qobject.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "dbus_watcher_interface.h"
|
||||
#include "item.hpp"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logStatusNotifierHost);
|
||||
QS_DECLARE_LOGGING_CATEGORY(logStatusNotifierHost);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "../../core/iconimageprovider.hpp"
|
||||
#include "../../core/imageprovider.hpp"
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/platformmenu.hpp"
|
||||
#include "../../dbus/dbusmenu/dbusmenu.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
|
@ -34,7 +35,7 @@ using namespace qs::dbus;
|
|||
using namespace qs::dbus::dbusmenu;
|
||||
using namespace qs::menu::platform;
|
||||
|
||||
Q_LOGGING_CATEGORY(logStatusNotifierItem, "quickshell.service.sni.item", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logStatusNotifierItem, "quickshell.service.sni.item", QtWarningMsg);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -11,12 +11,13 @@
|
|||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/imageprovider.hpp"
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../dbus/dbusmenu/dbusmenu.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
#include "dbus_item.h"
|
||||
#include "dbus_item_types.hpp"
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logStatusNotifierItem);
|
||||
QS_DECLARE_LOGGING_CATEGORY(logStatusNotifierItem);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
#include <qobject.h>
|
||||
#include <qtmetamacros.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(logStatusNotifierWatcher, "quickshell.service.sni.watcher", QtWarningMsg);
|
||||
#include "../../core/logcat.hpp"
|
||||
|
||||
QS_LOGGING_CATEGORY(logStatusNotifierWatcher, "quickshell.service.sni.watcher", QtWarningMsg);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(logStatusNotifierWatcher);
|
||||
#include "../../core/logcat.hpp"
|
||||
|
||||
QS_DECLARE_LOGGING_CATEGORY(logStatusNotifierWatcher);
|
||||
|
||||
namespace qs::service::sni {
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <qobject.h>
|
||||
#include <qqmllist.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../core/model.hpp"
|
||||
#include "../../dbus/bus.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
|
@ -21,7 +22,7 @@
|
|||
namespace qs::service::upower {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logUPower, "quickshell.service.upower", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logUPower, "quickshell.service.upower", QtWarningMsg);
|
||||
}
|
||||
|
||||
UPower::UPower() {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <qstring.h>
|
||||
#include <qtypes.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
#include "dbus_device.h"
|
||||
|
||||
|
@ -16,7 +17,7 @@ using namespace qs::dbus;
|
|||
namespace qs::service::upower {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logUPowerDevice, "quickshell.service.upower.device", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logUPowerDevice, "quickshell.service.upower.device", QtWarningMsg);
|
||||
}
|
||||
|
||||
QString UPowerDeviceState::toString(UPowerDeviceState::Enum status) {
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
#include <qobject.h>
|
||||
#include <qstringliteral.h>
|
||||
|
||||
#include "../../core/logcat.hpp"
|
||||
#include "../../dbus/bus.hpp"
|
||||
#include "../../dbus/properties.hpp"
|
||||
|
||||
namespace qs::service::upower {
|
||||
|
||||
namespace {
|
||||
Q_LOGGING_CATEGORY(logPowerProfiles, "quickshell.service.powerprofiles", QtWarningMsg);
|
||||
QS_LOGGING_CATEGORY(logPowerProfiles, "quickshell.service.powerprofiles", QtWarningMsg);
|
||||
}
|
||||
|
||||
QString PowerProfile::toString(PowerProfile::Enum profile) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue