Re: [PATCH] Don't log client errors in libvirtd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/23/2010 11:53 AM, Matthias Bolte wrote:
> This reverts commit
> 
>   Log all errors at level INFO to stop polluting syslog
>   04bd0360f32ec628ecf7943b3fd1468d6eb2dde5.
> 
> and makes virRaiseErrorFull() only log errors when not inside
> libvirtd. This stops libvirtd from polluting it's own log with
> client errors that'll be reported and logged on the client
> side anyway.
> ---
>  daemon/libvirtd.c        |    2 ++
>  src/libvirt_private.syms |    2 ++
>  src/util/logging.c       |   14 ++++++++++++++
>  src/util/logging.h       |    4 ++++
>  src/util/virterror.c     |   22 ++++++++++++++++++++--
>  5 files changed, 42 insertions(+), 2 deletions(-)

Makes sense to me, and fixes the testsuite failures, but I'd recommend
that you also wait for Dan's opinion before you push it.

> 
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index 66f1388..0b75624 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -3083,6 +3083,8 @@ int main(int argc, char **argv) {
>          exit(EXIT_FAILURE);
>      }
>  
> +    virLogSetDaemonMode(true);
> +

Hmm, should this line be relocated into daemonForkIntoBackground(), so
that if you manually run libvirtd in the foreground, you still get
messages, and it is only when running libvirtd -d by the system that we
enable daemon-mode logging?

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]