Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
50f6b66b
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
50f6b66b
编写于
9月 22, 2010
作者:
E
Eric Blake
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: grammar cleanups on logging examples
* docs/logging.html.in: Fix spelling and grammar.
上级
4dfde8cd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
docs/logging.html.in
docs/logging.html.in
+17
-17
未找到文件。
docs/logging.html.in
浏览文件 @
50f6b66b
...
@@ -4,33 +4,33 @@
...
@@ -4,33 +4,33 @@
<h1
>
Logging in the library and the daemon
</h1>
<h1
>
Logging in the library and the daemon
</h1>
<p>
Libvirt includes logging facilities starting from version 0.6.0,
<p>
Libvirt includes logging facilities starting from version 0.6.0,
this complements the
<a
href=
"errors.html"
>
error handling
</a>
this complements the
<a
href=
"errors.html"
>
error handling
</a>
mechanism and APIs to allow tracing though the execution of the
mechanism and APIs to allow tracing th
r
ough the execution of the
library as well as in the libvirtd daemon.
</p>
library as well as in the libvirtd daemon.
</p>
<p>
The logging functionalities in libvirt are based on 3 key concepts,
<p>
The logging functionalities in libvirt are based on 3 key concepts,
similar to the one present in other generic logging facilities like
similar to the one present in other generic logging facilities like
log4j:
</p>
log4j:
</p>
<ul>
<ul>
<li>
log messages: they are information generated at runtime by
<li>
log messages: they are information generated at runtime by
the libvirt code
, it
includes a priority level (DEBUG = 1,
the libvirt code
. Each message
includes a priority level (DEBUG = 1,
INFO = 2, WARNING = 3, ERROR = 4), a category, function name and
INFO = 2, WARNING = 3, ERROR = 4), a category, function name and
line number, indicating where it originated from, and finally
line number, indicating where it originated from, and finally
a formatted message
, i
n addition the library adds a timestamp
a formatted message
. I
n addition the library adds a timestamp
at the begining of the message
</li>
at the begining of the message
</li>
<li>
log filters:
it's a set of patter and priorities allowing to a
cept
<li>
log filters:
a set of patterns and priorities to ac
cept
or reject a log message
, i
f the message category matches a filter,
or reject a log message
. I
f the message category matches a filter,
the message priority is compared to the filter priority, if lower
the message priority is compared to the filter priority, if lower
the message is discarded, if higher the message is output. If
the message is discarded, if higher the message is output. If
no filter matches, then a general priority level is applied to
no filter matches, then a general priority level is applied to
all remaining messages. This allows
to capture for example
all
all remaining messages. This allows
, for example, capturing
all
debug messages for the QEmu driver, but otherwise only allow
debug messages for the QEmu driver, but otherwise only allow
ing
errors to show up from other parts
</li>
errors to show up from other parts
.
</li>
<li>
log outputs: once a message has gone though filtering a set of
<li>
log outputs: once a message has gone th
r
ough filtering a set of
output defines where to send the message, they can also filter
output defines where to send the message, they can also filter
based on the priority, for example it may be useful to output
based on the priority, for example it may be useful to output
all messages to a debugging file but only allow errors to be
all messages to a debugging file but only allow errors to be
logged though syslog.
</li>
logged th
r
ough syslog.
</li>
</ul>
</ul>
<p>
The library configuration of logging is though 3 environment variables
<p>
The library configuration of logging is th
r
ough 3 environment variables
allowing to control the logging behaviour:
</p>
allowing to control the logging behaviour:
</p>
<ul>
<ul>
<li>
LIBVIRT_DEBUG: it can take the four following values:
<li>
LIBVIRT_DEBUG: it can take the four following values:
...
@@ -41,14 +41,14 @@
...
@@ -41,14 +41,14 @@
<li>
3 or "warn": log warnings and errors, that's the default value
</li>
<li>
3 or "warn": log warnings and errors, that's the default value
</li>
<li>
4 or "error": log only error messages
</li>
<li>
4 or "error": log only error messages
</li>
</ul></li>
</ul></li>
<li>
LIBVIRT_LOG_FILTERS:
allow to define
logging filters
</li>
<li>
LIBVIRT_LOG_FILTERS:
defines
logging filters
</li>
<li>
LIBVIRT_LOG_OUTPUTS:
allow to define
logging outputs
</li>
<li>
LIBVIRT_LOG_OUTPUTS:
defines
logging outputs
</li>
</ul>
</ul>
<p>
Note that, for example, setting LIBVIRT_DEBUG= is the same as unset. If
<p>
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
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
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.
</p>
applied up to the point at which libvirt encountered the error.
</p>
<p>
Similary the daemon logging behaviour can be tuned using 3 config
<p>
Similar
l
y the daemon logging behaviour can be tuned using 3 config
variables, stored in the configuration file:
variables, stored in the configuration file:
<ul>
<ul>
<li>
log_level: accepts the following values:
<li>
log_level: accepts the following values:
...
@@ -58,8 +58,8 @@
...
@@ -58,8 +58,8 @@
<li>
2: informations, warnings and errors
</li>
<li>
2: informations, warnings and errors
</li>
<li>
1: debug and everything
</li>
<li>
1: debug and everything
</li>
</ul></li>
</ul></li>
<li>
log_filters:
allow to define
logging filters
</li>
<li>
log_filters:
defines
logging filters
</li>
<li>
log_outputs:
allow to define
logging outputs
</li>
<li>
log_outputs:
defines
logging outputs
</li>
</ul>
</ul>
<p>
When starting the libvirt daemon, any logging environment variable
<p>
When starting the libvirt daemon, any logging environment variable
settings will override settings in the config file. Command line options
settings will override settings in the config file. Command line options
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<li>
3: WARNING
</li>
<li>
3: WARNING
</li>
<li>
4: ERROR
</li>
<li>
4: ERROR
</li>
</ul>
</ul>
<p>
Multiple output can be defined
, they just need to be separated by
<p>
Multiple output can be defined, they just need to be separated by
spaces, e.g.:
<code>
"3:syslog:libvirtd 1:file:/tmp/libvirt.log"
</code>
spaces, e.g.:
<code>
"3:syslog:libvirtd 1:file:/tmp/libvirt.log"
</code>
will log all warnings and errors to syslog under the libvirtd ident
will log all warnings and errors to syslog under the libvirtd ident
but also log everything debugging and informations included in the
but also log everything debugging and informations included in the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录