Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/64515
to review the following change.
Change subject: docs: add README about logging configuration ......................................................................
docs: add README about logging configuration
Most notably, document how to tune the logging settings of Vdsm at runtime, using Vdsclient
Change-Id: I2653c2a68fcf42b1e085ae1ee703fb119a0cf1fc Backport-To: 4.0 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/60533 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg danken@redhat.com --- M Makefile.am A README.logging M vdsm.spec.in 3 files changed, 64 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/64515/1
diff --git a/Makefile.am b/Makefile.am index 9ac2515..1f1f0fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,6 +39,7 @@ # rpm from the tarball. EXTRA_DIST = \ .gitignore \ + README.logging \ autobuild.sh \ autogen.sh \ build-aux/pkg-version \ diff --git a/README.logging b/README.logging new file mode 100644 index 0000000..c6ec567 --- /dev/null +++ b/README.logging @@ -0,0 +1,60 @@ +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 DEBUG, INFO, WARNING +`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 WARNING virt + +3. same as #2, for storage (case is significant here) +vdsClient -s 0 setLogLevel WARNING Storage +vdsClient -s 0 setLogLevel WARNING storage + +4. silence JSONRPC logs: +vdsClient -s 0 setLogLevel WARNING jsonrpc + + +Notes +----- + +[1] https://docs.python.org/2/library/logging.html +[2] https://docs.python.org/2/library/logging.config.html#logging-config-filefor... diff --git a/vdsm.spec.in b/vdsm.spec.in index 50c01e8..13596d6 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -937,7 +937,9 @@
%files %defattr(-, root, root, -) -%doc README lib/vdsm/vdsm.conf.sample +%doc README +%doc lib/vdsm/vdsm.conf.sample +%doc README.logging %license COPYING /usr/lib/systemd/systemd-vdsmd /usr/lib/systemd/system-preset/85-vdsmd.preset
gerrit-hooks has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 1: Verified-1
* update_tracker: OK
* Check Bug-Url::ERROR, At least one bug-url is required for the stable branch * Check merged to previous::OK, change not open on any previous branch
Francesco Romani has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2:
Rerun-Hooks: all
gerrit-hooks has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: -Verified
* update_tracker: OK * Check Bug-Url::OK * Check Public Bug::#1369822::OK, public bug * Check Public Bug::#1377069::OK, public bug * Check Product::#1369822::OK, Correct product Red Hat Enterprise Virtualization Manager * Check Product::#1377069::OK, Correct classification oVirt * Check TM::#1369822::OK, correct target milestone ovirt-4.0.5 * Check TM::#1377069::OK, correct target milestone ovirt-4.0.5 * Check merged to previous::OK, change not open on any previous branch
gerrit-hooks has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2:
* update_tracker: OK * Check Bug-Url::OK * Check Public Bug::#1369822::OK, public bug * Check Public Bug::#1377069::OK, public bug * Check Product::#1369822::OK, Correct product Red Hat Enterprise Virtualization Manager * Check Product::#1377069::OK, Correct classification oVirt * Check TM::#1369822::OK, correct target milestone ovirt-4.0.5 * Check TM::#1377069::OK, correct target milestone ovirt-4.0.5 * Check merged to previous::OK, change not open on any previous branch
Jenkins CI has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: Continuous-Integration+1
Propagate review hook: Continuous Integration value inherited from patch 1
Francesco Romani has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: Verified+1
we add a non-code file, so if jenkins is happy, so we are
Francesco Romani has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: Code-Review+2
Francesco Romani has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: -Code-Review
Milan Zamazal has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 2: Code-Review+2
Francesco Romani has submitted this change and it was merged.
Change subject: docs: add README about logging configuration ......................................................................
docs: add README about logging configuration
Most notably, document how to tune the logging settings of Vdsm at runtime, using Vdsclient
Change-Id: I2653c2a68fcf42b1e085ae1ee703fb119a0cf1fc Related-To: https://bugzilla.redhat.com/1364149 Bug-Url: https://bugzilla.redhat.com/1369822 Bug-Url: https://bugzilla.redhat.com/1377069 Backport-To: 4.0 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/60533 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg danken@redhat.com Reviewed-on: https://gerrit.ovirt.org/64515 Reviewed-by: Milan Zamazal mzamazal@redhat.com --- M Makefile.am A README.logging M vdsm.spec.in 3 files changed, 64 insertions(+), 1 deletion(-)
Approvals: Jenkins CI: Passed CI tests Francesco Romani: Verified; Looks good to me, approved Milan Zamazal: Looks good to me, but someone else must approve
gerrit-hooks has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 3:
* update_tracker: OK * Set MODIFIED::bug 1369822::::#1369822::::OK, already on MODIFIED * Set MODIFIED::bug 1369822::::bug 1377069::::#1377069::::OK
Martin Polednik has posted comments on this change.
Change subject: docs: add README about logging configuration ......................................................................
Patch Set 3:
(1 comment)
https://gerrit.ovirt.org/#/c/64515/3/README.logging File README.logging:
PS3, Line 16: could Does that mean it cannot be configured in such way anymore? Should that even be mentioned in the readme if that's the case (and I have a feeling that it's not)?
vdsm-patches@lists.fedorahosted.org