Commit 1d5a0328 authored by Martin Flöser's avatar Martin Flöser
Browse files

Introduce categorized logging

New logging categories KWAYLAND_SERVER and KWAYLAND_CLIENT.
parent 6f755bf6
......@@ -9,6 +9,7 @@ set(SERVER_LIB_SRCS
display.cpp
global.cpp
keyboard_interface.cpp
logging.cpp
output_interface.cpp
pointer_interface.cpp
region_interface.cpp
......
......@@ -20,6 +20,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "display.h"
#include "compositor_interface.h"
#include "datadevicemanager_interface.h"
#include "logging_p.h"
#include "output_interface.h"
#include "seat_interface.h"
#include "shell_interface.h"
......@@ -68,7 +69,7 @@ void Display::Private::installSocketNotifier()
}
int fd = wl_event_loop_get_fd(loop);
if (fd == -1) {
qWarning() << "Did not get the file descriptor for the event loop";
qCWarning(KWAYLAND_SERVER) << "Did not get the file descriptor for the event loop";
return;
}
QSocketNotifier *m_notifier = new QSocketNotifier(fd, QSocketNotifier::Read, q);
......@@ -94,7 +95,7 @@ void Display::Private::flush()
return;
}
if (wl_event_loop_dispatch(loop, 0) != 0) {
qWarning() << "Error on dispatching Wayland event loop";
qCWarning(KWAYLAND_SERVER) << "Error on dispatching Wayland event loop";
}
wl_display_flush_clients(display);
}
......
/********************************************************************
Copyright 2015 Martin Gräßlin <mgraesslin@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "logging_p.h"
Q_LOGGING_CATEGORY(KWAYLAND_SERVER, "kwayland-server");
/********************************************************************
Copyright 2015 Martin Gräßlin <mgraesslin@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) version 3, or any
later version accepted by the membership of KDE e.V. (or its
successor approved by the membership of KDE e.V.), which shall
act as a proxy defined in Section 6 of version 3 of the license.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWAYALND_SERVER_LOGGING_P_H
#define KWAYALND_SERVER_LOGGING_P_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KWAYLAND_SERVER)
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment