Commit acdc2d01 authored by Alvin Wong's avatar Alvin Wong

Set logging default severity to avoid calling QLoggingCategory::setFilterRules

parent 7171ca96
......@@ -28,7 +28,6 @@
#include <QDesktopServices>
#include <QDir>
#include <QDate>
#include <QLoggingCategory>
#include <QLocale>
#include <QSettings>
......@@ -97,18 +96,6 @@ extern "C" int main(int argc, char **argv)
qputenv("QT_QPA_PLATFORM", "xcb");
#endif
/**
* Disable debug output by default. (krita.input enables tablet debugging.)
* Debug logs can be controlled by an environment variable QT_LOGGING_RULES.
*
* As an example, to get full debug output, run the following:
* export QT_LOGGING_RULES="krita*=true"; krita
*
* See: http://doc.qt.io/qt-5/qloggingcategory.html
*/
QLoggingCategory::setFilterRules("krita*.debug=false\n"
"krita*.warning=true\n"
"krita.tabletlog=true");
// A per-user unique string, without /, because QLocalServer cannot use names with a / in it
QString key = "Krita3" + QDesktopServices::storageLocation(QDesktopServices::HomeLocation).replace("/", "_");
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &FLAKE_LOG() \
{
static const QLoggingCategory category("krita.lib.flake");
static const QLoggingCategory category("krita.lib.flake", QtInfoMsg);
return category;
}
......
......@@ -84,23 +84,23 @@ QString kisBacktrace()
return s;
}
Q_LOGGING_CATEGORY(_30009, "krita.lib.resources")
Q_LOGGING_CATEGORY(_41000, "krita.general")
Q_LOGGING_CATEGORY(_41001, "krita.core")
Q_LOGGING_CATEGORY(_41002, "krita.registry")
Q_LOGGING_CATEGORY(_41003, "krita.tools")
Q_LOGGING_CATEGORY(_41004, "krita.tiles")
Q_LOGGING_CATEGORY(_41005, "krita.filters")
Q_LOGGING_CATEGORY(_41006, "krita.plugins")
Q_LOGGING_CATEGORY(_41007, "krita.ui")
Q_LOGGING_CATEGORY(_41008, "krita.file")
Q_LOGGING_CATEGORY(_41009, "krita.math")
Q_LOGGING_CATEGORY(_41010, "krita.render")
Q_LOGGING_CATEGORY(_41011, "krita.scripting")
Q_LOGGING_CATEGORY(_41012, "krita.input")
Q_LOGGING_CATEGORY(_41013, "krita.action")
Q_LOGGING_CATEGORY(_41014, "krita.tabletlog")
Q_LOGGING_CATEGORY(_41015, "krita.opengl")
Q_LOGGING_CATEGORY(_30009, "krita.lib.resources", QtInfoMsg)
Q_LOGGING_CATEGORY(_41000, "krita.general", QtInfoMsg)
Q_LOGGING_CATEGORY(_41001, "krita.core", QtInfoMsg)
Q_LOGGING_CATEGORY(_41002, "krita.registry", QtInfoMsg)
Q_LOGGING_CATEGORY(_41003, "krita.tools", QtInfoMsg)
Q_LOGGING_CATEGORY(_41004, "krita.tiles", QtInfoMsg)
Q_LOGGING_CATEGORY(_41005, "krita.filters", QtInfoMsg)
Q_LOGGING_CATEGORY(_41006, "krita.plugins", QtInfoMsg)
Q_LOGGING_CATEGORY(_41007, "krita.ui", QtInfoMsg)
Q_LOGGING_CATEGORY(_41008, "krita.file", QtInfoMsg)
Q_LOGGING_CATEGORY(_41009, "krita.math", QtInfoMsg)
Q_LOGGING_CATEGORY(_41010, "krita.render", QtInfoMsg)
Q_LOGGING_CATEGORY(_41011, "krita.scripting", QtInfoMsg)
Q_LOGGING_CATEGORY(_41012, "krita.input", QtInfoMsg)
Q_LOGGING_CATEGORY(_41013, "krita.action", QtInfoMsg)
Q_LOGGING_CATEGORY(_41014, "krita.tabletlog", QtDebugMsg)
Q_LOGGING_CATEGORY(_41015, "krita.opengl", QtInfoMsg)
QString __methodName(const char *_prettyFunction)
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &PLUGIN_LOG() \
{
static const QLoggingCategory category("krita.lib.plugin");
static const QLoggingCategory category("krita.lib.plugin", QtInfoMsg);
return category;
}
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &ODF_LOG() \
{
static const QLoggingCategory category("krita.lib.odf");
static const QLoggingCategory category("krita.lib.odf", QtInfoMsg);
return category;
}
......
......@@ -19,7 +19,7 @@
#include "DebugPigment.h"
const QLoggingCategory &PIGMENT_log() \
{
static const QLoggingCategory category("krita.lib.pigment");
static const QLoggingCategory category("krita.lib.pigment", QtInfoMsg);
return category;
}
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &STORE_LOG() \
{
static const QLoggingCategory category("krita.lib.store");
static const QLoggingCategory category("krita.lib.store", QtInfoMsg);
return category;
}
......
......@@ -19,7 +19,7 @@
#include "VectorImageDebug.h"
const QLoggingCategory &VECTOR_IMAGE_LOG() \
{
static const QLoggingCategory category("krita.lib.vectorimage");
static const QLoggingCategory category("krita.lib.vectorimage", QtInfoMsg);
return category;
}
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &WIDGETS_LOG() \
{
static const QLoggingCategory category("krita.lib.widgets");
static const QLoggingCategory category("krita.lib.widgets", QtInfoMsg);
return category;
}
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &KRITAWIDGETUTILS_LOG()
{
static const QLoggingCategory category("krita.lib.widgetutils");
static const QLoggingCategory category("krita.lib.widgetutils", QtInfoMsg);
return category;
}
......
......@@ -39,10 +39,6 @@ extern "C" int main(int argc, char **argv)
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
KisOpenGL::setDefaultFormat();
QLoggingCategory::setFilterRules("krita*.debug=false\n"
"krita*.warning=false\n"
"krita.tabletlog=false");
// first create the application so we can create a pixmap
KisApplication app("kritarunner", argc, argv);
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &TEXT_LOG() \
{
static const QLoggingCategory category("krita.lib.text");
static const QLoggingCategory category("krita.lib.text", QtInfoMsg);
return category;
}
......
......@@ -20,7 +20,7 @@
const QLoggingCategory &TEXT_LAYOUT_LOG() \
{
static const QLoggingCategory category("krita.lib.textlayout");
static const QLoggingCategory category("krita.lib.textlayout", QtInfoMsg);
return category;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment