Skip to content

Instantly share code, notes, and snippets.

@estan
Last active October 22, 2017 14:49
Show Gist options
  • Save estan/7c2fcb10263d2e9540aa85feb7665fcf to your computer and use it in GitHub Desktop.
Save estan/7c2fcb10263d2e9540aa85feb7665fcf to your computer and use it in GitHub Desktop.
######################################################################
# Automatically generated by qmake (3.0) s�n okt. 22 16:45:15 2017
######################################################################
TEMPLATE = app
TARGET = logcat
INCLUDEPATH += .
# Input
SOURCES += main.cpp
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(Log)
Q_LOGGING_CATEGORY(Log, "my.category")
int main(int argc, char *argv[]) {
Q_UNUSED(argc);
Q_UNUSED(argv);
qCDebug(Log) << "hello";
return 0;
}
[estan@newton logcat]$ QT_LOGGING_RULES="my.category=false" ./logcat
my.category: hello
[estan@newton logcat]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment