diff options
author | Stefan Hajnoczi <stefanha@gmail.com> | 2019-09-04 15:59:18 +0100 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2019-09-04 15:59:18 +0100 |
commit | 317181e8ea1b3406919b946ca5524f8b9f34817d (patch) | |
tree | 0d0e0a2eb0d3d309dbabbdcdd6cb62131507b592 /lib/meson.build | |
parent | f39c71dcf99292c188bb6f0a117d7e118f92bfb1 (diff) | |
download | libfuse-317181e8ea1b3406919b946ca5524f8b9f34817d.tar.gz |
Introduce callback for logging
Introduce an API for custom log handler functions. This allows libfuse
applications to send messages to syslog(3) or other logging systems.
See include/fuse_log.h for details.
Convert libfuse from fprintf(stderr, ...) to log_fuse(level, ...). Most
messages are error messages with FUSE_LOG_ERR log level. There are also
some debug messages which now use the FUSE_LOG_DEBUG log level.
Note that lib/mount_util.c is used by both libfuse and fusermount3.
Since fusermount3 does not link against libfuse, we cannot call
fuse_log() from lib/mount_util.c. This file will continue to use
fprintf(stderr, ...) until someone figures out how to split it up.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'lib/meson.build')
-rw-r--r-- | lib/meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/meson.build b/lib/meson.build index e27feab..28f0aee 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -1,7 +1,8 @@ libfuse_sources = ['fuse.c', 'fuse_i.h', 'fuse_loop.c', 'fuse_loop_mt.c', 'fuse_lowlevel.c', 'fuse_misc.h', 'fuse_opt.c', 'fuse_signals.c', 'buffer.c', 'cuse_lowlevel.c', - 'helper.c', 'modules/subdir.c', 'mount_util.c' ] + 'helper.c', 'modules/subdir.c', 'mount_util.c', + 'fuse_log.c' ] if host_machine.system().startswith('linux') libfuse_sources += [ 'mount.c' ] |