forked from oVirt/vdsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.logging
62 lines (41 loc) · 1.75 KB
/
README.logging
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Logging in Vdsm
===============
Basic configuration
-------------------
Vdsm uses the python standard module[1] for logging.
It can be configured using /etc/vdsm/logger.conf;
the supervdsm logging is configured separately, using
/etc/vdsm/svdsm.logger.conf
Tuning the logging at runtime
-----------------------------
Vdsm logging could be configured extensively[2]
using the configuration files, but this requires a restart of the daemon.
You can also configure the logging to some extent at runtime, without
any restart, using vdsClient as explained below.
Please note that any change you make using vdsClient is not permanent, and
will be lost once Vdsm is restarted.
Using vdsClient, you can tune the log level of any logger Vdsm uses.
The basic syntax is:
# vdsClient [-s] SERVER setLogLevel LEVEL [LOGGER]
`LEVEL` is one of TRACE, DEBUG, INFO, WARN
`LOGGER` is any logger Vdsm uses. Please check the configuration file
to learn about some predefined loggers.
If no LOGGER is given, the root logger is used implicitely.
Please note that the logging configuration of Vdsm is quite complex, so
few trivial settings may yield surprising results.
Examples of runtime tuning of logging
-------------------------------------
1. set everything to the DEBUG level:
vdsClient -s 0 setLogLevel DEBUG
2. silence virt logs, show only warnings, errors or worse:
vdsClient -s 0 setLogLevel WARN virt
3. same as #2, for storage
vdsClient -s 0 setLogLevel WARN storage
4. silence JSONRPC logs:
vdsClient -s 0 setLogLevel WARN jsonrpc
5. enable the 'devel' logs, which could be useful for developers
vdsClient -s 0 setLogLevel devel WARN
Notes
-----
[1] https://docs.python.org/2/library/logging.html
[2] https://docs.python.org/2/library/logging.config.html#logging-config-fileformat