2 * FUSE: Filesystem in Userspace
3 * Copyright (C) 2019 Red Hat, Inc.
5 * This program can be distributed under the terms of the GNU LGPLv2.
6 * See the file COPYING.LIB.
14 * This file defines the logging interface of FUSE
21 * These levels correspond to syslog(2) log levels since they are widely used.
35 * Log message handler function.
37 * This function must be thread-safe. It may be called from any libfuse
38 * function, including fuse_parse_cmdline() and other functions invoked before
39 * a FUSE filesystem is created.
41 * Install a custom log message handler function using fuse_set_log_func().
43 * @param level log severity level
44 * @param fmt sprintf-style format string including newline
45 * @param ap format string arguments
47 typedef void (*fuse_log_func_t
)(enum fuse_log_level level
, const char *fmt
,
51 * Install a custom log handler function.
53 * Log messages are emitted by libfuse functions to report errors and debug
54 * information. Messages are printed to stderr by default but this can be
55 * overridden by installing a custom log message handler function.
57 * The log message handler function is global and affects all FUSE filesystems
58 * created within this process.
60 * @param func a custom log message handler function or NULL to revert to
63 void fuse_set_log_func(fuse_log_func_t func
);
68 * @param level severity level (FUSE_LOG_ERR, FUSE_LOG_DEBUG, etc)
69 * @param fmt sprintf-style format string including newline
71 void fuse_log(enum fuse_log_level level
, const char *fmt
, ...);
73 #endif /* FUSE_LOG_H_ */