blob: b79adfa738f4f43dbead77e194442a3ca4236a20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef REPORTHANDLER_H
#define REPORTHANDLER_H
#include <QtCore/QLoggingCategory>
#include <QtCore/QString>
Q_DECLARE_LOGGING_CATEGORY(lcShiboken)
Q_DECLARE_LOGGING_CATEGORY(lcShibokenDoc)
class ReportHandler
{
public:
enum DebugLevel { NoDebug, SparseDebug, MediumDebug, FullDebug };
static void install();
static void startTimer();
static DebugLevel debugLevel();
static void setDebugLevel(DebugLevel level);
static bool setDebugLevelFromArg(const QString &);
static int warningCount();
static int suppressedCount();
static void startProgress(const QByteArray &str);
static void endProgress();
static bool isDebug(DebugLevel level)
{ return debugLevel() >= level; }
static bool isSilent();
static void setSilent(bool silent);
static void setPrefix(const QString &p);
static QByteArray doneMessage();
private:
static void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
};
#endif // REPORTHANDLER_H
|