Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Logger.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2024 Symless Ltd.
4 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
5 */
6
7#pragma once
8
9#include <QObject>
10
11#ifdef NDEBUG
12const bool kDebug = false;
13#else
14const bool kDebug = true;
15#endif
16
17namespace deskflow::gui {
18
19class Logger : public QObject
20{
21 Q_OBJECT
22
23public:
24 static Logger &instance()
25 {
26 return s_instance;
27 }
28
29 void loadEnvVars();
30 void handleMessage(const QtMsgType type, const QString &fileLine, const QString &message);
31 void logVerbose(const QString &message) const;
32
33Q_SIGNALS:
34 void newLine(const QString &line);
35
36private:
37 static Logger s_instance;
38 bool m_debug = kDebug;
39 bool m_verbose = false;
40};
41
42inline void logVerbose(const QString &message)
43{
45}
46
47} // namespace deskflow::gui
static int type
Definition ArchNetworkWinsock.cpp:44
const bool kDebug
Definition Logger.h:14
Definition Logger.h:20
void logVerbose(const QString &message) const
Definition Logger.cpp:65
void handleMessage(const QtMsgType type, const QString &fileLine, const QString &message)
Definition Logger.cpp:72
static Logger & instance()
Definition Logger.h:24
void newLine(const QString &line)
void loadEnvVars()
Definition Logger.cpp:59
Definition IServerConfig.h:14
void logVerbose(const QString &message)
Definition Logger.h:42