From 0e7ac3d230879986d9353c13eed4b45038f3eee4 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Sat, 25 Oct 2014 14:34:16 +0100 Subject: Disable debug output by default for Qt3D It is possible to override this, e.g. if you need more debug logging, by specifying a categorised logging file by means of the QT_LOGGING_CONF environment variable. For example to enable debug logging on a bunch of categories create a text file containing the following: [Rules] Qt3D.Core.Nodes.debug=true Qt3D.Core.Aspects.debug=true Qt3D.Core.Resources.debug=true Qt3D.Core.ChangeArbiter.debug=true Qt3D.Render.Backend.debug=true Qt3D.Render.Frontend=.debug=true Qt3D.Render.IO.debug=true Qt3D.Render.Jobs.debug=true Qt3D.Render.Framegraph.debug=true Qt3D.Render.RenderNodes.debug=true Qt3D.Render.Rendering.debug=true Qt3D.Render.Memory.debug=true And then set this as the active rules by pointing QT_LOGGING_CONF at the file. You can verify where the logging rules are coming from by defining the QT_LOGGING_DEBUG environment variable. Change-Id: Iad3824c6db0b7f22c417b06734204c666a2ee8dd Reviewed-by: Paul Lemire --- src/core/aspects/qaspectengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp index 38d7d6deb..dea6987f3 100644 --- a/src/core/aspects/qaspectengine.cpp +++ b/src/core/aspects/qaspectengine.cpp @@ -76,6 +76,10 @@ QAspectEnginePrivate::QAspectEnginePrivate(QAspectEngine *qq) QAspectEngine::QAspectEngine(QObject *parent) : QObject(*new QAspectEnginePrivate(this), parent) { + // Don't show any debug output from Qt3D. If you need to enable additional logging + // for debugging use a rules file as explained in the QLoggingCategory documentation. + QLoggingCategory::setFilterRules(QString::fromUtf8("Qt3D.*.debug=false\n")); + qCDebug(Aspects) << Q_FUNC_INFO; Q_D(QAspectEngine); d->m_aspectThread = new QAspectThread(this); -- cgit v1.2.3