Implemented logging mechanism (#785)

This commit is contained in:
niansa/tuxifan
2023-06-01 16:50:42 +02:00
committed by GitHub
parent 243c762411
commit ddb5fa718d
4 changed files with 83 additions and 0 deletions

18
gpt4all-chat/logger.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef LOGGER_H
#define LOGGER_H
#include <QFile>
class Logger
{
QFile m_file;
static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
public:
static Logger *globalInstance();
explicit Logger();
friend class MyLogger;
};
#endif // LOGGER_H