virtiofsd: print log only when priority is high enough
commitd240314a1a18a1d914af1b5763fe8c9a572e6409
authorEryu Guan <eguan@linux.alibaba.com>
Fri, 9 Aug 2019 08:25:35 +0000 (9 16:25 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:37 +0000 (23 16:41 +0000)
tree75bbcf09c3027d494cb5d85f35ad53be81d6bb5f
parentf185621d41f03a23b55795b89e6584253fa23505
virtiofsd: print log only when priority is high enough

Introduce "-o log_level=" command line option to specify current log
level (priority), valid values are "debug info warn err", e.g.

    ./virtiofsd -o log_level=debug ...

So only log priority higher than "debug" will be printed to
stderr/syslog. And the default level is info.

The "-o debug"/"-d" options are kept, and imply debug log level.

Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
dgilbert: Reworked for libfuse's log_func
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
with fix by:
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_lowlevel.c
tools/virtiofsd/fuse_lowlevel.h
tools/virtiofsd/helper.c
tools/virtiofsd/passthrough_ll.c