Music Hub ..
A session-wide music playback service
 
Loading...
Searching...
No Matches
logging.h
Go to the documentation of this file.
1/*
2 * Copyright © 2021-2022 UBports Foundation.
3 *
4 * Contact: Alberto Mardegan <mardy@users.sourceforge.net>
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19
20#ifndef LOGGING_H_
21#define LOGGING_H_
22
23#include <QLoggingCategory>
24
25namespace core {
26namespace lomiri {
27namespace media {
28
29// Log returns the core::lomiri::media-wide configured logger instance.
30// Save to call before/after main.
31const QLoggingCategory &Log();
32
33} // namespace media
34} // namespace lomiri
35} // namespace core
36
37#define MH_TRACE(...) qCDebug(core::lomiri::media::Log(), __VA_ARGS__)
38#define MH_DEBUG(...) qCDebug(core::lomiri::media::Log(), __VA_ARGS__)
39#define MH_INFO(...) qCInfo(core::lomiri::media::Log(), __VA_ARGS__)
40#define MH_WARNING(...) qCWarning(core::lomiri::media::Log(), __VA_ARGS__)
41#define MH_ERROR(...) qCCritical(core::lomiri::media::Log(), __VA_ARGS__)
42#define MH_FATAL(...) qCCritical(core::lomiri::media::Log(), __VA_ARGS__)
43
44#endif
const QLoggingCategory & Log()
Definition logging.cpp:28