diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-04-13 13:37:56 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-24 17:12:46 +0200 |
commit | c0d249019b098890fb8e5e9e144c2dd8029a670c (patch) | |
tree | c65c071920b8e8ebb3b1ad65ae1f5df7851ddcf3 /src/corelib/global/qlogging.h | |
parent | e92e5fda44602d7595aca329a3133ecb9991a6dd (diff) |
Allow qDebug output to be configured by qSetMessagePattern()
Add qSetMessagePattern() to configure the default
message pattern. This one can still be overwritten by setting the
QT_MESSAGE_PATTERN environment variable.
Without this method, there's actually no way to change the
default output programatically. Since QT_MESSAGE_PATTERN is
evaluated when the first message arrives, setting it via e.g. qputenv
might have no effect/be too late.
Change-Id: I115e0c30606f128fdbf5c169a951ffa2a6a48517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlogging.h')
-rw-r--r-- | src/corelib/global/qlogging.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 216b847952..ae388b0a38 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -168,6 +168,8 @@ Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler(QtMessageHandler); typedef void (*QMessageHandler)(QtMsgType, const QMessageLogContext &, const char *); Q_CORE_EXPORT QMessageHandler qInstallMessageHandler(QMessageHandler); +Q_CORE_EXPORT void qSetMessagePattern(const QString &messagePattern); + QT_END_HEADER QT_END_NAMESPACE |