diff options
Diffstat (limited to 'src/libcephfs_proxy/proxy_log.h')
-rw-r--r-- | src/libcephfs_proxy/proxy_log.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libcephfs_proxy/proxy_log.h b/src/libcephfs_proxy/proxy_log.h new file mode 100644 index 00000000000..02f45f9b110 --- /dev/null +++ b/src/libcephfs_proxy/proxy_log.h @@ -0,0 +1,28 @@ + +#ifndef __LIBCEPHFSD_PROXY_LOG_H__ +#define __LIBCEPHFSD_PROXY_LOG_H__ + +#include "proxy.h" + +enum { LOG_CRIT, LOG_ERR, LOG_WARN, LOG_INFO, LOG_DBG }; + +struct _proxy_log_handler { + list_t list; + proxy_log_callback_t callback; +}; + +int32_t proxy_log_args(int32_t level, int32_t err, const char *fmt, + va_list args); + +int32_t proxy_log(int32_t level, int32_t err, const char *fmt, ...); + +void proxy_abort_args(int32_t err, const char *fmt, va_list args); + +void proxy_abort(int32_t err, const char *fmt, ...); + +void proxy_log_register(proxy_log_handler_t *handler, + proxy_log_callback_t callback); + +void proxy_log_deregister(proxy_log_handler_t *handler); + +#endif |