forked from oVirt/vdsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.logging
61 lines (41 loc) · 1.83 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
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 vdsm-client as explained below.
Please note that any change you make using vdsm-client is not permanent, and
will be lost once Vdsm is restarted.
Using vdsm-client, you can tune the log level of any logger Vdsm uses.
The basic syntax is:
# vdsm-client [-a ADDRESS] Host setLogLevel level=LEVEL [name=LOGGER]
`LEVEL` is one of 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:
vdsm-client Host setLogLevel level=DEBUG
2. silence virt logs, show only warnings, errors or worse:
vdsm-client Host setLogLevel level=WARN name=virt
3. same as #2, for storage
vdsm-client Host setLogLevel level=WARN name=storage
4. silence JSONRPC logs:
vdsm-client Host setLogLevel level=WARN name=jsonrpc
5. enable the 'devel' logs, which could be useful for developers
vdsm-client Host setLogLevel name=devel level=WARN
Notes
-----
[1] https://docs.python.org/2/library/logging.html
[2] https://docs.python.org/2/library/logging.config.html#logging-config-fileformat