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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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