diff options
author | Eryu Guan <eguan@linux.alibaba.com> | 2019-08-09 16:25:35 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:37 +0000 |
commit | d240314a1a18a1d914af1b5763fe8c9a572e6409 (patch) | |
tree | 75bbcf09c3027d494cb5d85f35ad53be81d6bb5f /tools/virtiofsd/fuse_lowlevel.h | |
parent | f185621d41f03a23b55795b89e6584253fa23505 (diff) |
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>
Diffstat (limited to 'tools/virtiofsd/fuse_lowlevel.h')
-rw-r--r-- | tools/virtiofsd/fuse_lowlevel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/virtiofsd/fuse_lowlevel.h b/tools/virtiofsd/fuse_lowlevel.h index f2750bc189..138041e5f1 100644 --- a/tools/virtiofsd/fuse_lowlevel.h +++ b/tools/virtiofsd/fuse_lowlevel.h @@ -1796,6 +1796,7 @@ struct fuse_cmdline_opts { int show_help; int print_capabilities; int syslog; + int log_level; unsigned int max_idle_threads; }; |