aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_log.c
AgeCommit message (Collapse)Author
2019-09-10log: move fuse_log() to the public header fileStefan Hajnoczi
Applications may wish to call fuse_log() for unified logging. This way they don't need to define their own wrappers to invoke the log message handler function installed by fuse_set_log_func(). Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-04Introduce callback for loggingStefan Hajnoczi
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>