16#define MESSAGE_PATTERN \
17 "[%{time MM-dd h:mm:ss.zzz} %{threadid} " \
18 "%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] " \
37 if (Params::isEndable(
"fileLog")) {
40 QString path = Params::getCurrentExecutable() +
".log";
41 auto file = Params::getArg(
"fileLog");
47 if (
logFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)) {
50#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0)
void init()
init This method initialize logging of all qt message into file.
The QuasaraAppUtils class This lib include base functions for the all applications of QuasarApp group...
void messageHandler(QtMsgType type, const QMessageLogContext &, const QString &msg)
bool checkLogType(QtMsgType type, VerboseLvl lvl)
VerboseLvl
The VerboseLvl enum uses for sets log level.
@ Warning
Warning message. This logs will marked as a Warning and printing if the verbose lvl >= 1.
@ Info
General information. This logs will marked as a Info and and printing if the verbose lvl >= 2.
@ Debug
Debug message. This logs will marked as a Debug and printing if the verbose lvl >= 3.
void gen(int size, QByteArray &result)