diff options
author | André Klitzing <aklitzing@gmail.com> | 2014-11-25 16:38:34 +0100 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2014-12-15 21:24:02 +0100 |
commit | 87ede1fc7a2b8f184733c8f09ccd8732b6b60353 (patch) | |
tree | 04914160a0592bca89bd4d0489e9d2a0277ca910 /src/corelib | |
parent | 19bb9aa9e51e48043544fd7edf5abfda67955a4b (diff) |
Fix constant "Qt" LOG_TAG in Android
The LOG_TAG for Android can be set by QCoreApplication::applicationName
instead of a constant "Qt" tag. This will avoid that multiple apps
will use the same tag.
Also it will be easier to filter the logs for different apps instead
of "adb logcat -s Qt" for all Qt apps.
Change-Id: I422cc3adf8b526634b5daa9a1bb1b90403de5618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 843ec6b0ca..0271573445 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1286,8 +1286,8 @@ static void android_default_message_handler(QtMsgType type, case QtFatalMsg: priority = ANDROID_LOG_FATAL; break; }; - __android_log_print(priority, "Qt", "%s:%d (%s): %s\n", - context.file, context.line, + __android_log_print(priority, qPrintable(QCoreApplication::applicationName()), + "%s:%d (%s): %s\n", context.file, context.line, context.function, qPrintable(message)); } #endif //Q_OS_ANDROID |