summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-12 12:53:13 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-12 12:53:13 +0200
commitaa3754d1058c08b18dc5c3f38ca9496ce152c584 (patch)
treef2df5de02aab5d82a75e63c54f1bb9882ff89583 /src/corelib/global
parenta12a67c820fb010bc0396233528d652b717842e6 (diff)
parent8c81b282f8e18897257b93cb3fc149d74441c40e (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlogging.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index f95e1e9447..c8293beb4e 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -876,7 +876,13 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
#if defined(QT_USE_SLOG2)
slog2_default_handler(type, logMessage.toLocal8Bit().constData());
#elif defined(Q_OS_ANDROID)
- android_default_message_handler(type, context, logMessage);
+ static bool logToAndroid = qEnvironmentVariableIsEmpty("QT_ANDROID_PLAIN_LOG");
+ if (logToAndroid) {
+ android_default_message_handler(type, context, logMessage);
+ } else {
+ fprintf(stderr, "%s", logMessage.toLocal8Bit().constData());
+ fflush(stderr);
+ }
#else
fprintf(stderr, "%s", logMessage.toLocal8Bit().constData());
fflush(stderr);