18#ifndef LIBCOUCHBASE_LOGGER_H
19#define LIBCOUCHBASE_LOGGER_H
44#define LCB_LOG_SPEC(fmt) "%s" fmt "%s"
46#define LCB_LOG_UD_OTAG "<ud>"
47#define LCB_LOG_UD_CTAG "</ud>"
59#define LCB_LOG_UD(instance, val) \
60 lcb_is_redacting_logs(instance) ? LCB_LOG_UD_OTAG : "", val, lcb_is_redacting_logs(instance) ? LCB_LOG_UD_CTAG : ""
62#define LCB_LOG_MD_OTAG "<md>"
63#define LCB_LOG_MD_CTAG "</md>"
76#define LCB_LOG_MD(instance, val) \
77 lcb_is_redacting_logs(instance) ? LCB_LOG_MD_OTAG : "", val, lcb_is_redacting_logs(instance) ? LCB_LOG_MD_CTAG : ""
79#define LCB_LOG_SD_OTAG "<sd>"
80#define LCB_LOG_SD_CTAG "</sd>"
90#define LCB_LOG_SD(instance, val) \
91 lcb_is_redacting_logs(instance) ? LCB_LOG_SD_OTAG : "", val, lcb_is_redacting_logs(instance) ? LCB_LOG_SD_CTAG : ""
93typedef struct lcb_LOGGER_ lcb_LOGGER;
109typedef void (*lcb_LOGGER_CALLBACK)(
const lcb_LOGGER *procs, uint64_t iid,
const char *subsys,
110 lcb_LOG_SEVERITY severity,
const char *srcfile,
int srcline,
const char *fmt,
122LIBCOUCHBASE_API
lcb_STATUS lcb_logger_create(lcb_LOGGER **logger,
void *cookie);
130LIBCOUCHBASE_API
lcb_STATUS lcb_logger_destroy(lcb_LOGGER *logger);
141LIBCOUCHBASE_API
lcb_STATUS lcb_logger_callback(lcb_LOGGER *logger, lcb_LOGGER_CALLBACK callback);
152LIBCOUCHBASE_API
lcb_STATUS lcb_logger_cookie(
const lcb_LOGGER *logger,
void **cookie);
lcb_STATUS
Error codes returned by the library.
Definition error.h:213