![]() |
Aerospike Client exposed logging functionality including:
To set the log level for the aerospike client, simply use as_log_set_level() and pass in the client log to set.
By default, the logger is not enabled.
To enable where log messages are sent, simply define a new as_log_callback, and set it for the client using as_log_set_callback():
Where the my_log_callback
could be defined as
#include "as_log.h"
Data Fields | |
as_log_callback | callback |
bool | callback_set |
as_log_level | level |
Related Symbols | |
(Note that these are not member symbols.) | |
typedef bool(* | as_log_callback) (as_log_level level, const char *func, const char *file, uint32_t line, const char *fmt,...) |
static const char * | as_log_level_tostring (as_log_level level) |
static void | as_log_set_callback (as_log_callback callback) |
static void | as_log_set_level (as_log_level level) |
|
related |
Callback function for as_log related logging calls.
The following is a simple log callback:
The function should return true on success.
level | The log level of the message. |
func | The function where the message was logged. |
file | The file where the message was logged. |
line | The line where the message was logged. |
fmt | The format string used. |
... | The format argument. |
|
related |
Convert log level to a string.
level | The log level. |
Definition at line 188 of file as_log.h.
References as_log_level_strings.
|
related |
Set logging callback for the global client log. To silence the log, set callback to NULL.
callback | The log callback. |
Definition at line 174 of file as_log.h.
References callback, callback_set, and g_as_log.
|
related |
as_log_callback as_log::callback |
as_log_level as_log::level |