ukui-search/libsearch/log-utils.h

22 lines
556 B
C
Raw Normal View History

#ifndef LOGUTILS_H
#define LOGUTILS_H
#include <QtMessageHandler>
class LogUtils
{
public:
static void initLogFile(const QString &fileName);
static void messageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
private:
static void checkLogFile();
static bool checkFileSize(const QString &fileName);
static void clearFile(const QString &fileName);
static quint64 m_startUpTime;
static int m_logFileId;
static QString m_logFileName;
static QString m_currentLogFile;
};
#endif // LOGUTILS_H