6#include <QLoggingCategory>
7#include <QMessageLogContext>
12Q_DECLARE_LOGGING_CATEGORY(APPLOG)
22 static void init(
const QString& filePath, qint64 maxSizeBytes);
28 static inline qint64
max_size = 5 * 1024 * 1024;
44 static void messageHandler(QtMsgType type,
const QMessageLogContext& context,
static void rotateLogFileIfNeeded()
partition logs into several log files
定义 log.cpp:16
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
Reprocessing message for add file name,line number etc. when in relase mode , add_definitions(-DQT_ME...
定义 log.cpp:32
static QMutex mutex
定义 log.h:26
static void init(const QString &filePath, qint64 maxSizeBytes)
定义 log.cpp:3
static qint64 max_size
定义 log.h:28
static void openLogFile()
定义 log.cpp:9
static QString log_file_path
定义 log.h:27
static QFile log_file
定义 log.h:25