aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-07-01 10:25:38 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-07-01 10:25:38 -0400
commitf04f1234078288d4806aaab0952d60f137337e81 (patch)
treef9bff170335fee185c37e40ea76eb59832f3f839 /src/qt/bitcoin.cpp
parentb29b5096128fe1a47677dbe93bf35115320f9036 (diff)
parent33fdd99288fd257d6b5a3797a0a68aff649a3a71 (diff)
Merge pull request #4448 from laanwj/2014_07_qt_payment_rq_logging
qt: Always log warning/error messages to debug.log
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 89305e9f35..569facb499 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -126,15 +126,15 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
#if QT_VERSION < 0x050000
void DebugMessageHandler(QtMsgType type, const char *msg)
{
- Q_UNUSED(type);
- LogPrint("qt", "GUI: %s\n", msg);
+ const char *category = (type == QtDebugMsg) ? "qt" : NULL;
+ LogPrint(category, "GUI: %s\n", msg);
}
#else
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
{
- Q_UNUSED(type);
Q_UNUSED(context);
- LogPrint("qt", "GUI: %s\n", qPrintable(msg));
+ const char *category = (type == QtDebugMsg) ? "qt" : NULL;
+ LogPrint(category, "GUI: %s\n", QString::toStdString(msg));
}
#endif