The documentation (and comment in libvirtd.conf) says that the text in
a log filter is compared to the "source file name", and gives the
example of "util/json", but this is not correct (at least not since
commit 2835c1e, possibly earlier). It is instead compared to the
string given in the VIR_LOG_INIT() macro invocation at the top of each
source file, which is always "similar to but not the same as" the
source file name (in the example above, the proper name is
"util.json", while the file name is "util/virjson.c"). This patch
corrects the misstatement in both the documentation and in
libvirtd.conf.
---
daemon/libvirtd.conf | 14 ++++++++++----
docs/logging.html.in | 15 +++++++++------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/daemon/libvirtd.conf b/daemon/libvirtd.conf
index 514e6e4..5485f98 100644
--- a/daemon/libvirtd.conf
+++ b/daemon/libvirtd.conf
@@ -344,10 +344,16 @@
# The format for a filter is one of:
# x:name
# x:+name
-# where name is a string which is matched against source file name,
-# e.g., "remote", "qemu", or "util/json", the optional
"+" prefix
-# tells libvirt to log stack trace for each message matching name,
-# and x is the minimal level where matching messages should be logged:
+
+# where name is a string which is matched against the category
+# given in the VIR_LOG_INIT() at the top of each libvirt source
+# file, e.g., "remote", "qemu", or "util.json" (the
name in the
+# filter can be a substring of the full category name, in order
+# to match multiple similar categories), the optional "+" prefix
+# tells libvirt to log stack trace for each message matching
+# name, and x is the minimal level where matching messages should
+# be logged:
+
# 1: DEBUG
# 2: INFO
# 3: WARNING
diff --git a/docs/logging.html.in b/docs/logging.html.in
index d8d8f1e..b6dc91c 100644
--- a/docs/logging.html.in
+++ b/docs/logging.html.in
@@ -104,12 +104,15 @@
<pre>
x:name (log message only)
x:+name (log message + stack trace)</pre>
- <p>where <code>name</code> is a string which is matched against
source
- file name, e.g., <code>remote</code>, <code>qemu</code>, or
- <code>util/json</code>, the optional <code>+</code> prefix
tells libvirt
- to log stack trace for each message matching <code>name</code>, and
- <code>x</code> is the minimal level where matching messages should
- be logged:</p>
+ <p>where <code>name</code> is a string which is matched against
+ the category given in the VIR_LOG_INIT() at the top of each
+ libvirt source file, e.g., <code>remote</code>,
<code>qemu</code>,
+ or <code>util.json</code> (the name in the filter can be a
+ substring of the full category name, in order to match multiple
+ similar categories), the optional <code>+</code> prefix tells
+ libvirt to log stack trace for each message
+ matching <code>name</code>, and <code>x</code> is the
minimal
+ level where matching messages should be logged:</p>
<ul>
<li>1: DEBUG</li>
<li>2: INFO</li>
--
2.5.0