All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Typedefs | Enumerations | Functions | Variables
target/Darwin-i386/include/citrusleaf/cf_log.h File Reference
#include <stdarg.h>
#include <citrusleaf/cf_atomic.h>
+ Include dependency graph for target/Darwin-i386/include/citrusleaf/cf_log.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Macro Definition Documentation

#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))

Typedef Documentation

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.

Parameters
levellog level for this log statement
fmtformat string for this log statement (does not end with '
')
...arguments corresponding to conversion characters in format string

Definition at line 77 of file target/Darwin-i386/include/citrusleaf/cf_log.h.

Enumeration Type Documentation

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 target/Darwin-i386/include/citrusleaf/cf_log.h.

Function Documentation

static int cf_debug_enabled ( )
inlinestatic

Definition at line 116 of file target/Darwin-i386/include/citrusleaf/cf_log.h.

References CF_DEBUG, and G_LOG_LEVEL.

static int cf_info_enabled ( )
inlinestatic

Definition at line 111 of file target/Darwin-i386/include/citrusleaf/cf_log.h.

References CF_INFO, and G_LOG_LEVEL.

static void cf_set_log_callback ( cf_log_callback  callback)
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.

Parameters
callbackcf_log_callback implementation

Definition at line 104 of file target/Darwin-i386/include/citrusleaf/cf_log.h.

References cf_atomic_p_set, and g_log_callback.

static void cf_set_log_level ( cf_log_level  level)
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.

Parameters
levelonly show logs at this or more urgent level

Definition at line 88 of file target/Darwin-i386/include/citrusleaf/cf_log.h.

References cf_atomic32_set, and g_log_level.

Variable Documentation

cf_atomic_p g_log_callback
cf_atomic32 g_log_level