aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-28 15:23:16 +0000
committersaturneric <[email protected]>2024-07-28 15:23:16 +0000
commit0f0b10586f69d08a1f9f12a0d0856f0ce243dcc0 (patch)
treee170743b70d4b5ff86f606328f8a6579ad5182b9 /src
parentfeat: add paper key module support (diff)
downloadGpgFrontend-0f0b10586f69d08a1f9f12a0d0856f0ce243dcc0.tar.gz
GpgFrontend-0f0b10586f69d08a1f9f12a0d0856f0ce243dcc0.zip
feat: log pattern should be different at release mode
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8ab17a40..77856fe0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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}] %{file}:%{line} - "
+ "critical}C%{endif}%{if-fatal}F%{endif}] [%{threadid}] - "
"%{message}");
-
-#ifdef RELEASE
- QLoggingCategory::setFilterRules("*.debug=false\n*.info=false\n");
#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}");
#endif
auto rtn = 0;