Git commit e8c714918d6d07c8b1505b01d65dd0836a0c9f2d by Mauro Carvalho Chehab.
Committed on 01/03/2017 at 12:22.
Pushed by mauroc into branch 'master'.

Document Kaffeine debug categories

Using --debug can be too verbose for digital TV, so messages
were grouped per category on past patches.

Document it.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

M  +54   -0    doc/man-kaffeine.1.docbook
M  +1    -1    src/main.cpp
M  +3    -1    src/mainwindow.cpp

https://commits.kde.org/kaffeine/e8c714918d6d07c8b1505b01d65dd0836a0c9f2d

diff --git a/doc/man-kaffeine.1.docbook b/doc/man-kaffeine.1.docbook
index 71355be..dc9609a 100644
--- a/doc/man-kaffeine.1.docbook
+++ b/doc/man-kaffeine.1.docbook
@@ -30,6 +30,7 @@
 <refsynopsisdiv>
 <cmdsynopsis>
 <command>kaffeine</command>
+<arg choice="opt"><option>-d, --debug</option></arg>
 <arg choice="opt"><option>--tempfile</option></arg>
 <arg choice="opt"><option>-f, --fullscreen</option></arg>
 <arg choice="opt"><option>--audiocd</option></arg>
@@ -59,6 +60,59 @@ from DVD (including DVD menus, titles, chapters, etc.), VCD, 
or a file.</para>
 <title>Options</title>
 
 <variablelist>
+
+<varlistentry>
+<term><option>-d</option> <option>--debug</option></term>
+<listitem><para>Enable all debug messages. Please notice that Kaffeine also
+allows fine-tuning debug messages, by enabling messages per category, by using 
the environment
+var:</para>
+<para><emphasis role="bold">
+QT_LOGGING_RULES=kaffeine.<emphasis>category</emphasis>.debug=true
+</emphasis></para>
+<para>where <emphasis>category</emphasis> can be:</para>
+
+<variablelist>
+<varlistentry>
+<term><option>cam</option></term>
+<listitem><para>for dvb CAM logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>dev</option></term>
+<listitem><para>for dvb device and libdvbv5 logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>dvbsi</option></term>
+<listitem><para>for dvb MPEG-TS SI parsing logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>epg</option></term>
+<listitem><para>for dvb EPG logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>dvb</option></term>
+<listitem><para>for other dvb logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>config</option></term>
+<listitem><para>for configuration logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>mediawidget</option></term>
+<listitem><para>for media widget logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>playlist</option></term>
+<listitem><para>for playlist logs</para></listitem>
+</varlistentry>
+<varlistentry>
+<term><option>sql</option></term>
+<listitem><para>for SQL lite logs</para></listitem>
+</varlistentry>
+</variablelist>
+
+</listitem>
+</varlistentry>
+
 <varlistentry>
 <term><option>--tempfile</option></term>
 <listitem><para>The files/URLs opened by the application will be deleted after 
use</para>
diff --git a/src/main.cpp b/src/main.cpp
index ee981ec..1913c1d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -132,7 +132,7 @@ KaffeineApplication::KaffeineApplication(int &argc, char 
**argv) : QApplication(
                // License
                KAboutLicense::GPL_V2,
                // Copyright statement
-               i18n("(C) 2007-2016 The Kaffeine Authors"),
+               i18n("(C) 2007-2017 The Kaffeine Authors"),
                // Optional additional text
                "",
                // Home page
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 951edf9..a92ebe8 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -66,6 +66,8 @@ Q_LOGGING_CATEGORY(logSql, "kaffeine.sql")
 
 #define FILTER_RULE "kaffeine.*.debug=true"
 
+#define CATEGORIES "cam, dev, dvb, dvbsi, epg, config, mediawidget, playlist, 
sql"
+
 class StackedLayout : public QStackedLayout
 {
 public:
@@ -493,7 +495,7 @@ MainWindow::MainWindow(KAboutData *aboutData, 
QCommandLineParser *parser)
        this->aboutData = aboutData;
        this->parser = parser;
 
-       parser->addOption(QCommandLineOption(QStringList() << 
QLatin1String("d") << QLatin1String("debug"), i18n("Enable debug messages")));
+       parser->addOption(QCommandLineOption(QStringList() << 
QLatin1String("d") << QLatin1String("debug"), i18n("Enable all debug messages. 
Please notice that Kaffeine also allows enabling debug messages per category, 
by using the environment 
var:\nQT_LOGGING_RULES=kaffeine.category.debug=true\nwhere 'category' can 
be:\n" CATEGORIES)));
        parser->addOption(QCommandLineOption(QStringList() << 
QLatin1String("tempfile"), i18n("The files/URLs opened by the application will 
be deleted after use")));
        parser->addOption(QCommandLineOption(QStringList() << 
QLatin1String("f") << QLatin1String("fullscreen"), i18n("Start in full screen 
mode")));
        parser->addOption(QCommandLineOption(QStringList() << 
QLatin1String("audiocd"), i18n("Play Audio CD")));

Reply via email to