diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2019-09-10 12:36:56 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2019-09-10 14:25:15 +0100 |
commit | d368dad2c8d34bc37d76ef36f79a463c12f933ff (patch) | |
tree | 40e5f938ccbf74be12e766047ae07862182e654f /include | |
parent | 7c1e09dbc2e4215969425e50ec03889d19a926d4 (diff) | |
download | libfuse-d368dad2c8d34bc37d76ef36f79a463c12f933ff.tar.gz |
log: move fuse_log() to the public header file
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_log.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/fuse_log.h b/include/fuse_log.h index df43697..5e112e0 100644 --- a/include/fuse_log.h +++ b/include/fuse_log.h @@ -67,6 +67,14 @@ typedef void (*fuse_log_func_t)(enum fuse_log_level level, */ void fuse_set_log_func(fuse_log_func_t func); +/** + * Emit a log message + * + * @param level severity level (FUSE_LOG_ERR, FUSE_LOG_DEBUG, etc) + * @param fmt sprintf-style format string including newline + */ +void fuse_log(enum fuse_log_level level, const char *fmt, ...); + #ifdef __cplusplus } #endif |