aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-01 14:57:45 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-01 14:58:02 +0200
commitd95ba75825d3b417d03cd2cce6bb944d5a679040 (patch)
treef401d481a0c96cfac35437373d53d87566c44ea8 /src/qt/bitcoin.cpp
parentb29b5096128fe1a47677dbe93bf35115320f9036 (diff)
downloadbitcoin-d95ba75825d3b417d03cd2cce6bb944d5a679040.tar.xz
qt: Log messages with type>QtDebugMsg as non-debug
More important messages should end up in the log no matter if -debug=qt is set.
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