![]() |
#include <stdarg.h>
#include <citrusleaf/cf_atomic.h>
Go to the source code of this file.
Macros | |
#define | G_LOG_CB ((cf_log_callback)cf_atomic_p_get(g_log_callback)) |
#define | G_LOG_LEVEL ((int)cf_atomic32_get(g_log_level)) |
Typedefs | |
typedef void(* | cf_log_callback )(cf_log_level level, const char *fmt,...) |
Enumerations | |
enum | cf_log_level { CF_NO_LOGGING = -1, CF_ERROR, CF_WARN, CF_INFO, CF_DEBUG, CF_NO_LOGGING = -1, CF_ERROR, CF_WARN, CF_INFO, CF_DEBUG } |
Functions | |
static int | cf_debug_enabled () |
static int | cf_info_enabled () |
static void | cf_set_log_callback (cf_log_callback callback) |
static void | cf_set_log_level (cf_log_level level) |
Variables | |
cf_atomic_p | g_log_callback |
cf_atomic32 | g_log_level |
#define G_LOG_CB ((cf_log_callback)cf_atomic_p_get(g_log_callback)) |
Definition at line 31 of file src/include/citrusleaf/cf_log.h.
#define G_LOG_LEVEL ((int)cf_atomic32_get(g_log_level)) |
Definition at line 30 of file src/include/citrusleaf/cf_log.h.
typedef void(* cf_log_callback)(cf_log_level level, const char *fmt,...) |
A callback function of this signature may be passed in cf_set_log_callback(), so the caller can channel Aerospike client logs as desired.
level | log level for this log statement |
fmt | format string for this log statement (does not end with ' ') |
... | arguments corresponding to conversion characters in format string |
Definition at line 77 of file src/include/citrusleaf/cf_log.h.
enum cf_log_level |
Log escalation level.
Enumerator | |
---|---|
CF_NO_LOGGING |
Pass this in cf_set_log_level() to suppress all logging. |
CF_ERROR |
Error condition has occurred. |
CF_WARN |
Unusual non-error condition has occurred. |
CF_INFO |
Normal information message. |
CF_DEBUG |
Message used for debugging purposes. |
CF_NO_LOGGING |
Pass this in cf_set_log_level() to suppress all logging. |
CF_ERROR |
Error condition has occurred. |
CF_WARN |
Unusual non-error condition has occurred. |
CF_INFO |
Normal information message. |
CF_DEBUG |
Message used for debugging purposes. |
Definition at line 40 of file src/include/citrusleaf/cf_log.h.
|
inlinestatic |
Definition at line 116 of file src/include/citrusleaf/cf_log.h.
References CF_DEBUG, and G_LOG_LEVEL.
|
inlinestatic |
Definition at line 111 of file src/include/citrusleaf/cf_log.h.
References CF_INFO, and G_LOG_LEVEL.
|
inlinestatic |
Set optional log callback.
Thread-safe - may be called at any time.
If no callback is registered, the Aerospike client writes logs to stderr.
To suppress logs, either set log level to CF_NO_LOGGING or ignore callbacks.
callback | cf_log_callback implementation |
Definition at line 104 of file src/include/citrusleaf/cf_log.h.
References cf_atomic_p_set, and g_log_callback.
|
inlinestatic |
Set logging level filter.
Thread-safe - may be called at any time.
To suppress logs, either set log level to CF_NO_LOGGING or ignore callbacks.
level | only show logs at this or more urgent level |
Definition at line 88 of file src/include/citrusleaf/cf_log.h.
References cf_atomic32_set, and g_log_level.
cf_atomic_p g_log_callback |
cf_atomic32 g_log_level |