feat: log pattern should be different at release mode

This commit is contained in:
saturneric 2024-07-28 17:23:16 +02:00
parent 4e0db9ef4b
commit 0f0b10586f

View File

@ -50,16 +50,20 @@ auto main(int argc, char* argv[]) -> int {
argc, argv);
ctx->InitApplication();
#ifdef RELEASE
QLoggingCategory::setFilterRules("*.debug=false\n*.info=false\n");
qSetMessagePattern(
"[%{time yyyyMMdd h:mm:ss.zzz}] [%{category}] "
"[%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-"
"critical}C%{endif}%{if-fatal}F%{endif}] [%{threadid}] - "
"%{message}");
#else
QLoggingCategory::setFilterRules("*.debug=false");
qSetMessagePattern(
"[%{time yyyyMMdd h:mm:ss.zzz}] [%{category}] "
"[%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-"
"critical}C%{endif}%{if-fatal}F%{endif}] [%{threadid}] %{file}:%{line} - "
"%{message}");
#ifdef RELEASE
QLoggingCategory::setFilterRules("*.debug=false\n*.info=false\n");
#else
QLoggingCategory::setFilterRules("*.debug=false");
#endif
auto rtn = 0;