]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* docs/logging.html docs/logging.html.in: new page documenting
authorDaniel Veillard <veillard@redhat.com>
Tue, 23 Dec 2008 13:47:10 +0000 (13:47 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 23 Dec 2008 13:47:10 +0000 (13:47 +0000)
  the logging system
* docs/auth.html docs/deployment.html docs/remote.html
  docs/sitemap.html docs/sitemap.html.in docs/uri.html
  docs/windows.html: integration in the existing set
Daniel

ChangeLog
docs/auth.html
docs/deployment.html
docs/logging.html [new file with mode: 0644]
docs/logging.html.in [new file with mode: 0644]
docs/remote.html
docs/sitemap.html
docs/sitemap.html.in
docs/uri.html
docs/windows.html

index 9a1bbb4031da74e9aee98287af3e82d19d27d879..658314cc6ee155684242b2fef4ac53c247f29f40 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Dec 23 14:44:41 CET 2008 Daniel Veillard <veillard@redhat.com>
+
+       * docs/logging.html docs/logging.html.in: new page documenting
+         the logging system
+       * docs/auth.html docs/deployment.html docs/remote.html
+         docs/sitemap.html docs/sitemap.html.in docs/uri.html
+         docs/windows.html: integration in the existing set
+
 Tue Dec 23 14:38:30 CET 2008 Guido Günther <agx@sigxcpu.org>
 
        * .x-sc_prohibit_asprintf: new file
index 3f74df206b02505b2bb60027d403f5e1b65992f6..590093e66c341a0a8599637f47fb26a9c707064d 100644 (file)
                         <div>
                           <a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
                         </div>
+                      </li><li>
+                        <div>
+                          <a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
+                        </div>
                       </li></ul>
                   </div>
                 </li><li>
index 5d1662469aea548203e1920bc5e08c9ebe244d26..36cfbc7e90db94ff0671fc02faca8cb3520d3a48 100644 (file)
                         <div>
                           <a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
                         </div>
+                      </li><li>
+                        <div>
+                          <a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
+                        </div>
                       </li></ul>
                   </div>
                 </li><li>
diff --git a/docs/logging.html b/docs/logging.html
new file mode 100644 (file)
index 0000000..167fb77
--- /dev/null
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!--
+        This file is autogenerated from logging.html.in
+        Do not edit this file. Changes will be lost.
+      -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+    <link rel="stylesheet" type="text/css" href="main.css" />
+    <link rel="SHORTCUT ICON" href="32favicon.png" />
+    <title>libvirt: Logging in the library and the daemon</title>
+    <meta name="description" content="libvirt, virtualization, virtualization API" />
+  </head>
+  <body>
+    <div id="header">
+      <div id="headerLogo"></div>
+      <div id="headerSearch">
+        <form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><div>
+            <input id="query" name="query" type="text" size="12" value="" />
+            <input id="submit" name="submit" type="submit" value="Search" />
+          </div></form>
+      </div>
+    </div>
+    <div id="body">
+      <div id="menu">
+        <ul class="l0"><li>
+            <div>
+              <a title="Front page of the libvirt website" class="inactive" href="index.html">Home</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Details of new features and bugs fixed in each release" class="inactive" href="news.html">News</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="downloads.html">Downloads</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Information for users, administrators and developers" class="active" href="docs.html">Documentation</a>
+              <ul class="l1"><li>
+                  <div>
+                    <a title="Information about deploying and using libvirt" class="active" href="deployment.html">Deployment</a>
+                    <ul class="l2"><li>
+                        <div>
+                          <a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
+                        </div>
+                      </li><li>
+                        <div>
+                          <span class="active">Logging</span>
+                        </div>
+                      </li></ul>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="intro.html">Architecture</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Description of the XML formats used in libvirt" class="inactive" href="format.html">XML format</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Hypervisor specific driver information" class="inactive" href="drivers.html">Drivers</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
+                  </div>
+                </li><li>
+                  <div>
+                    <a title="Bindings of the libvirt API for other languages" class="inactive" href="bindings.html">Language bindings</a>
+                  </div>
+                </li></ul>
+            </div>
+          </li><li>
+            <div>
+              <a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Frequently asked questions" class="inactive" href="FAQ.html">FAQ</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="How and where to report bugs and request features" class="inactive" href="bugs.html">Bug reports</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="How to contact the developers via email and IRC" class="inactive" href="contact.html">Contact</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Miscellaneous links of interest related to libvirt" class="inactive" href="relatedlinks.html">Related Links</a>
+            </div>
+          </li><li>
+            <div>
+              <a title="Overview of all content on the website" class="inactive" href="sitemap.html">Sitemap</a>
+            </div>
+          </li></ul>
+      </div>
+      <div id="content">
+        <h1>Logging in the library and the daemon</h1>
+        <p>Libvirt includes logging facilities starting from version 0.6.0,
+       this complements the <a href="errors.html">error handling</a>
+       mechanism and APIs to allow tracing though the execution of the
+       library as well as in the libvirtd daemon.</p>
+        <p>The logging functionalities in libvirt are based on 3 key concepts,
+       similar to the one present in other generic logging facilities like
+       log4j:</p>
+        <ul><li>log messages: they are information generated at runtime by
+          the libvirt code, it includes a priority level (DEBUG = 1,
+          INFO = 2, WARNING = 3, ERROR = 4), a category, function name and
+          line number, indicating where it originated from, and finally
+          a formatted message, in addition the library adds a timestamp
+          at the begining of the message</li><li>log filters: it's a set of patter and priorities allowing to acept
+          or reject a log message, if the message category matches a filter,
+          the message priority is compared to the filter priority, if lower
+          the message is discarded, if higher the message is output. If
+          no filter matches, then a general priority level is applied to
+          all remaining messages. This allows to capture for example all
+          debug messages for the QEmu driver, but otherwise only allow
+          errors to show up from other parts</li><li>log outputs: once a message has gone though filtering a set of
+          output defines where to send the message, they can also filter
+          based on the priority, for example it may be useful to output
+          all messages to a debugging file but only allow errors to be
+          logged though syslog.</li></ul>
+        <p>The library configuration of logging is though 3 environment variables
+    allowing to control the logging behaviour:</p>
+        <ul><li>LIBVIRT_DEBUG: it can take the four following values:
+      <ul><li>1 or "debug": asking the library to log every message emitted,
+            though the filters can be used to avoid filling up the output</li><li>2 or "info": log all non-debugging informations</li><li>3 or "warn": log warnings and errors, that's the default value</li><li>4 or "error": log only error messages</li></ul></li><li>LIBVIRT_LOG_FILTERS: allow to define logging filters</li><li>LIBVIRT_LOG_OUTPUTS: allow to define logging outputs</li></ul>
+        <p>Similary the daemon logging behaviour can be tuned using 3 config
+    variables, stored in the configuration file:
+    </p>
+        <ul><li>log_level: accepts the following values:
+      <ul><li>0: no logging at all</li><li>4: only errors</li><li>3: warnings and errors</li><li>2: informations, warnings and errors</li><li>1: debug and everything</li></ul></li><li>log_filters: allow to define logging filters</li><li>log_outputs: allow to define logging outputs</li></ul>
+        <p>In both case the syntax for filters and outputs is similar.</p>
+        <p>The format for a filter is:</p>
+        <pre>x:name</pre>
+        <p>where <code>name</code> is a match string e.g. <code>remote</code> or
+    <code>qemu</code> and the x is the minimal level where matching messages
+    should be logged:</p>
+        <ul><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
+        <p>Multiple filter can be defined in a single string, they just need to be
+    separated by spaces, e.g: <code>"3:remote 4:event"</code> to only get
+    warning or errors from the remote layer and only errors from the event
+    layer.</p>
+        <p>
+    </p>
+        <p>The format for an output can be one of those 3 forms:</p>
+        <ul><li><code>x:stderr</code> output goes to stderr</li><li><code>x:syslog:name</code> use syslog for the output and use the
+      given <code>name</code> as the ident</li><li><code>x:file:file_path</code>output to a file, with the given
+      filepath</li></ul>
+        <p>In all cases the x prefix is the minimal level, acting as a filter:</p>
+        <ul><li>0: everything</li><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
+        <p>Multiple output can be defined , they just need to be separated by
+       spaces, e.g.: <code>"3:syslog:libvirtd 0:file:/tmp/libvirt.log"</code>
+       will log all warnings and errors to syslog under the libvirtd ident
+       but also log everything debugging and informations included in the
+       file <code>/tmp/libvirt.log</code></p>
+        <p>For example setting up the following:</p>
+        <pre>export LIBVIRT_DEBUG=1
+export LIBVIRT_LOG_OUTPUTS="0:file:virsh.log"</pre>
+        <p>and then running virsh will accumulate the logs in the
+    <code>virsh.log</code> file in a way similar to:</p>
+        <pre>14:29:04.771: debug : virInitialize:278 : register drivers
+14:29:04.771: debug : virRegisterDriver:618 : registering Test as driver 0</pre>
+        <p>the messages are timestamped, there is also the level recorded,
+    if debug the name of the function is also printed and then the formatted
+    message. This should be sufficient to at least get a precise idea of
+    what is happening and where things are going wrong, allowing to then
+    put the correct breakpoints when running under a debugger.</p>
+      </div>
+    </div>
+    <div id="footer">
+      <p id="sponsor">
+           Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
+    </div>
+  </body>
+</html>
diff --git a/docs/logging.html.in b/docs/logging.html.in
new file mode 100644 (file)
index 0000000..11ea68c
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<html>
+  <body>
+    <h1 >Logging in the library and the daemon</h1>
+    <p>Libvirt includes logging facilities starting from version 0.6.0,
+       this complements the <a href="errors.html">error handling</a>
+       mechanism and APIs to allow tracing though the execution of the
+       library as well as in the libvirtd daemon.</p>
+    <p>The logging functionalities in libvirt are based on 3 key concepts,
+       similar to the one present in other generic logging facilities like
+       log4j:</p>
+    <ul>
+      <li>log messages: they are information generated at runtime by
+          the libvirt code, it includes a priority level (DEBUG = 1,
+          INFO = 2, WARNING = 3, ERROR = 4), a category, function name and
+          line number, indicating where it originated from, and finally
+          a formatted message, in addition the library adds a timestamp
+          at the begining of the message</li>
+      <li>log filters: it's a set of patter and priorities allowing to acept
+          or reject a log message, if the message category matches a filter,
+          the message priority is compared to the filter priority, if lower
+          the message is discarded, if higher the message is output. If
+          no filter matches, then a general priority level is applied to
+          all remaining messages. This allows to capture for example all
+          debug messages for the QEmu driver, but otherwise only allow
+          errors to show up from other parts</li>
+      <li>log outputs: once a message has gone though filtering a set of
+          output defines where to send the message, they can also filter
+          based on the priority, for example it may be useful to output
+          all messages to a debugging file but only allow errors to be
+          logged though syslog.</li>
+    </ul>
+    <p>The library configuration of logging is though 3 environment variables
+    allowing to control the logging behaviour:</p>
+    <ul>
+      <li>LIBVIRT_DEBUG: it can take the four following values:
+      <ul>
+        <li>1 or "debug": asking the library to log every message emitted,
+            though the filters can be used to avoid filling up the output</li>
+        <li>2 or "info": log all non-debugging informations</li>
+        <li>3 or "warn": log warnings and errors, that's the default value</li>
+        <li>4 or "error": log only error messages</li>
+      </ul></li>
+      <li>LIBVIRT_LOG_FILTERS: allow to define logging filters</li>
+      <li>LIBVIRT_LOG_OUTPUTS: allow to define logging outputs</li>
+    </ul>
+    <p>Similary the daemon logging behaviour can be tuned using 3 config
+    variables, stored in the configuration file:
+    <ul>
+      <li>log_level: accepts the following values:
+      <ul>
+        <li>0: no logging at all</li>
+        <li>4: only errors</li>
+        <li>3: warnings and errors</li>
+        <li>2: informations, warnings and errors</li>
+        <li>1: debug and everything</li>
+      </ul></li>
+      <li>log_filters: allow to define logging filters</li>
+      <li>log_outputs: allow to define logging outputs</li>
+    </ul>
+    <p>In both case the syntax for filters and outputs is similar.</p>
+    <p>The format for a filter is:</p>
+    <pre>x:name</pre>
+    <p>where <code>name</code> is a match string e.g. <code>remote</code> or
+    <code>qemu</code> and the x is the minimal level where matching messages
+    should be logged:</p>
+    <ul>
+      <li>1: DEBUG</li>
+      <li>2: INFO</li>
+      <li>3: WARNING</li>
+      <li>4: ERROR</li>
+    </ul>
+    <p>Multiple filter can be defined in a single string, they just need to be
+    separated by spaces, e.g: <code>"3:remote 4:event"</code> to only get
+    warning or errors from the remote layer and only errors from the event
+    layer.<p>
+    <p>The format for an output can be one of those 3 forms:</p>
+    <ul>
+      <li><code>x:stderr</code> output goes to stderr</li>
+      <li><code>x:syslog:name</code> use syslog for the output and use the
+      given <code>name</code> as the ident</li>
+      <li><code>x:file:file_path</code>output to a file, with the given
+      filepath</li>
+    </ul>
+    <p>In all cases the x prefix is the minimal level, acting as a filter:</p>
+    <ul>
+      <li>0: everything</li>
+      <li>1: DEBUG</li>
+      <li>2: INFO</li>
+      <li>3: WARNING</li>
+      <li>4: ERROR</li>
+    </ul>
+    <p>Multiple output can be defined , they just need to be separated by
+       spaces, e.g.: <code>"3:syslog:libvirtd 0:file:/tmp/libvirt.log"</code>
+       will log all warnings and errors to syslog under the libvirtd ident
+       but also log everything debugging and informations included in the
+       file <code>/tmp/libvirt.log</code></p>
+    <p>For example setting up the following:</p>
+    <pre>export LIBVIRT_DEBUG=1
+export LIBVIRT_LOG_OUTPUTS="0:file:virsh.log"</pre>
+    <p>and then running virsh will accumulate the logs in the
+    <code>virsh.log</code> file in a way similar to:</p>
+    <pre>14:29:04.771: debug : virInitialize:278 : register drivers
+14:29:04.771: debug : virRegisterDriver:618 : registering Test as driver 0</pre>
+    <p>the messages are timestamped, there is also the level recorded,
+    if debug the name of the function is also printed and then the formatted
+    message. This should be sufficient to at least get a precise idea of
+    what is happening and where things are going wrong, allowing to then
+    put the correct breakpoints when running under a debugger.</p>
+  </body>
+</html>
index aca3f47f80d057ac8caa09a5c3ab74530ec05914..c8824e60431c4aba0f33cfbb8186ce417cbd626f 100644 (file)
                         <div>
                           <a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
                         </div>
+                      </li><li>
+                        <div>
+                          <a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
+                        </div>
                       </li></ul>
                   </div>
                 </li><li>
index c74e116aa16418ddfedc908dc299c03f73759141..29b523284abaf737c2f31638b07153c361f06e57 100644 (file)
@@ -99,6 +99,9 @@
               </li><li>
                 <a href="windows.html">Windows port</a>
                 <span>Access the libvirt daemon from a native Windows client</span>
+              </li><li>
+                <a href="logging.html">Logging</a>
+                <span>The library and the daemon logging support</span>
               </li></ul></li><li>
             <a href="intro.html">Architecture</a>
             <span>Overview of the logical subsystems in the libvirt API</span>
index 0e801666bff1f7c6861481706ffb59a697858d3c..8ee2dd7f001a6def2d901d0955da6265f37b8eeb 100644 (file)
                 <a href="windows.html">Windows port</a>
                 <span>Access the libvirt daemon from a native Windows client</span>
               </li>
+              <li>
+                <a href="logging.html">Logging</a>
+                <span>The library and the daemon logging support</span>
+              </li>
             </ul>
           </li>
           <li>
index 8979a1335f21c7ec522add55dcdbb67e2a7ad74c..a663aad13fabcfcc64d2cd42b0f758c4bb5c8265 100644 (file)
                         <div>
                           <a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
                         </div>
+                      </li><li>
+                        <div>
+                          <a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
+                        </div>
                       </li></ul>
                   </div>
                 </li><li>
index 8ceb49d389bd7845565c5f6a8a2b509341478efb..7e9745eda24013150fc0e2ed0a703262c69dd319 100644 (file)
                         <div>
                           <span class="active">Windows port</span>
                         </div>
+                      </li><li>
+                        <div>
+                          <a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
+                        </div>
                       </li></ul>
                   </div>
                 </li><li>