26 #include <QFileInfoList>
29 #include "src/classes/astandardpaths.h"
52 static QDir logFolder;
53 static QString logFileName;
54 const static int numberOfLogs = 10;
55 const static int sizeOfLogs = 1024 * 100;
57 const static auto DEB_HEADER = QLatin1String(
" [DEBG]:\t");
58 const static auto INFO_HEADER = QLatin1String(
" [INFO]:\t");
59 const static auto WARN_HEADER = QLatin1String(
" [WARN]:\t");
60 const static auto CRIT_HEADER = QLatin1String(
" [CRIT]:\t");
61 const static auto DEB_HEADER_CONSOLE = QLatin1String(
"\u001b[38;5;75m[DEBG]:\t");
62 const static auto INFO_HEADER_CONSOLE = QLatin1String(
"\033[32m[INFO]:\t\033[m");
63 const static auto WARN_HEADER_CONSOLE = QLatin1String(
"\033[33m[WARN]:\t\033[m");
64 const static auto CRIT_HEADER_CONSOLE = QLatin1String(
"\033[35m[CRIT]:\t\033[m");
65 const static auto SPACER = QLatin1String(
"\t\t");
66 const static auto D_SPACER = QLatin1String(
"\t\t\t\t");
68 bool init(
bool log_debug =
false);
71 void aMessageHandler(QtMsgType type,
const QMessageLogContext &context,
const QString& msg);
72 inline static const QString timeNow(){
return QTime::currentTime().toString(Qt::ISODate);}
104 #define REPR(cls, str) \
106 QDebug operator<<(QDebug qdb, const cls& object) \
108 qdb << QString(#cls) + '(' + str + ')'; \