From 7534be6fbcfeb06eac5715729e8e4c95271f5e00 Mon Sep 17 00:00:00 2001 From: Amy Griffis Date: Thu, 6 Aug 2009 15:58:38 +0200 Subject: [PATCH] Update logging documentation * docs/logging.html[.in] try to include a little more description about the corner cases, things someone might get hung up on on. --- docs/logging.html | 22 ++++++++++++++++++++-- docs/logging.html.in | 22 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/docs/logging.html b/docs/logging.html index b16a7bb423..0a11c274f6 100644 --- a/docs/logging.html +++ b/docs/logging.html @@ -147,24 +147,42 @@ +

Note that, for example, setting LIBVIRT_DEBUG= is the same as unset. If + you specify an invalid value, it will be ignored with a warning. If you + have an error in a filter or output string, some of the settings may be + applied up to the point at which libvirt encountered the error.

Similary the daemon logging behaviour can be tuned using 3 config variables, stored in the configuration file:

-

In both case the syntax for filters and outputs is similar.

+

When starting the libvirt daemon, any logging environment variable + settings will override settings in the config file. Command line options + take precedence over all. If no outputs are defined for libvirtd, it + defaults to logging to syslog when it is running as a daemon, or to + stderr when it is running in the foreground.

+

Libvirtd does not reload its logging configuration when issued a SIGHUP. + If you want to reload the configuration, you must do a service + libvirtd restart or manually stop and restart the daemon + yourself.

+

The syntax for filters and outputs is the same for both types of + variables.

The format for a filter is:

x:name

where name is a match string e.g. remote or qemu and the x is the minimal level where matching messages should be logged:

-

Multiple filter can be defined in a single string, they just need to be +

Multiple filters can be defined in a single string, they just need to be separated by spaces, e.g: "3:remote 4:event" to only get warning or errors from the remote layer and only errors from the event layer.

+

If you specify a log priority in a filter that is below the default log + priority level, messages that match that filter will still be logged, + while others will not. In order to see those messages, you must also have + an output defined that includes the priority level of your filter.

The format for an output can be one of those 3 forms:

+

Note that, for example, setting LIBVIRT_DEBUG= is the same as unset. If + you specify an invalid value, it will be ignored with a warning. If you + have an error in a filter or output string, some of the settings may be + applied up to the point at which libvirt encountered the error.

Similary the daemon logging behaviour can be tuned using 3 config variables, stored in the configuration file:

-

In both case the syntax for filters and outputs is similar.

+

When starting the libvirt daemon, any logging environment variable + settings will override settings in the config file. Command line options + take precedence over all. If no outputs are defined for libvirtd, it + defaults to logging to syslog when it is running as a daemon, or to + stderr when it is running in the foreground.

+

Libvirtd does not reload its logging configuration when issued a SIGHUP. + If you want to reload the configuration, you must do a service + libvirtd restart or manually stop and restart the daemon + yourself.

+

The syntax for filters and outputs is the same for both types of + variables.

The format for a filter is:

x:name

where name is a match string e.g. remote or @@ -69,10 +83,14 @@

  • 3: WARNING
  • 4: ERROR
  • -

    Multiple filter can be defined in a single string, they just need to be +

    Multiple filters can be defined in a single string, they just need to be separated by spaces, e.g: "3:remote 4:event" to only get warning or errors from the remote layer and only errors from the event layer.

    +

    If you specify a log priority in a filter that is below the default log + priority level, messages that match that filter will still be logged, + while others will not. In order to see those messages, you must also have + an output defined that includes the priority level of your filter.

    The format for an output can be one of those 3 forms: