Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
1d5a0328
Commit
1d5a0328
authored
Jan 20, 2015
by
Martin Flöser
Browse files
Introduce categorized logging
New logging categories KWAYLAND_SERVER and KWAYLAND_CLIENT.
parent
6f755bf6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/wayland/CMakeLists.txt
View file @
1d5a0328
...
...
@@ -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
...
...
src/wayland/display.cpp
View file @
1d5a0328
...
...
@@ -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"
;
q
C
Warning
(
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"
;
q
C
Warning
(
KWAYLAND_SERVER
)
<<
"Error on dispatching Wayland event loop"
;
}
wl_display_flush_clients
(
display
);
}
...
...
src/wayland/server/logging.cpp
0 → 100644
View file @
1d5a0328
/********************************************************************
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"
);
src/wayland/server/logging_p.h
0 → 100644
View file @
1d5a0328
/********************************************************************
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment