summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Fischer <[email protected]>2015-04-29 16:39:38 +0200
committerAndi Fischer <[email protected]>2015-04-29 16:39:38 +0200
commitbf9761b1d7cbd07f4c2ead246caf61af38a32afc (patch)
tree38c27f6c318f404ed2dbb7f85923aeee9ef2923b
parent721db4d6eac005f3db47948899f54ca63dca8fff (diff)
Setting the debug message pattern.
-rw-r--r--umbrello/debug/debug_utils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/umbrello/debug/debug_utils.cpp b/umbrello/debug/debug_utils.cpp
index 0dc1521..cf30013 100644
--- a/umbrello/debug/debug_utils.cpp
+++ b/umbrello/debug/debug_utils.cpp
@@ -40,11 +40,16 @@ Tracer* Tracer::instance()
/**
* Constructor.
+ * The debug message pattern can be changed by adding something like the following line to ~/.bashrc:
+ * export QT_MESSAGE_PATTERN="`echo -e "%{appname}(%{pid})/(%{category}) \033[31m%{if-debug}\033[34m%{endif}%{function}\033[0m: %{message}"`"
+ *
* @param parent the parent widget
*/
Tracer::Tracer(QWidget *parent)
: QTreeWidget(parent)
{
+ qSetMessagePattern(QStringLiteral("%{appname} \033\[31m%{if-debug}\033\[32m%{endif}%{function}\033\[0m: %{message}"));
+
//TODO: can be removed in Qt 5.3
QLoggingCategory::setFilterRules(QStringLiteral("umbrello.debug = true"));