quasardb C API
|
Typedefs | |
typedef size_t | qdb_log_callback_id |
An unique callback identifier returned by qdb_log_add_callback. More... | |
typedef void(* | qdb_log_callback )(qdb_log_level_t, const unsigned long *, unsigned long, unsigned long, const char *, size_t) |
A typedef representing a log callback. More... | |
Enumerations | |
enum | qdb_log_level_t { qdb_log_detailed = 100, qdb_log_debug = 200, qdb_log_info = 300, qdb_log_warning = 400, qdb_log_error = 500, qdb_log_panic = 600 } |
An enumeration of log level. More... | |
Functions | |
QDB_API_LINKAGE qdb_error_t | qdb_log_add_callback (qdb_log_callback cb, qdb_log_callback_id *callback_id) |
Adds a callback that will receive internal API log messages. This can be used to incorporate internal API statuses in your log. More... | |
QDB_API_LINKAGE qdb_error_t | qdb_log_remove_callback (qdb_log_callback_id callback_id) |
Removes a previously added log callback. More... | |
QDB_API_LINKAGE int | qdb_log_option_is_sync (void) |
Indicates if logs are synchronized for each API call (disabled by default). More... | |
QDB_API_LINKAGE void | qdb_log_option_set_sync (int sync_logger) |
Set logs to be synchronous for each API call (disabled by default). More... | |
qdb_log_callback |
A typedef representing a log callback.
An unique callback identifier returned by qdb_log_add_callback.
enum qdb_log_level_t |
An enumeration of log level.
QDB_API_LINKAGE qdb_error_t qdb_log_add_callback | ( | qdb_log_callback | cb, |
qdb_log_callback_id * | callback_id | ||
) |
Adds a callback that will receive internal API log messages. This can be used to incorporate internal API statuses in your log.
cb | A callback of type qdb_log_callback. The callback will be called every time the API emits a log message. |
callback_id | A pointer to a unique callback identifier that can be used to remove the callback. |
QDB_API_LINKAGE int qdb_log_option_is_sync | ( | void | ) |
Indicates if logs are synchronized for each API call (disabled by default).
QDB_API_LINKAGE void qdb_log_option_set_sync | ( | int | sync_logger | ) |
Set logs to be synchronous for each API call (disabled by default).
sync_logger | 1 if logs must be flushed before returning from each API call, 0 otherwise. |
QDB_API_LINKAGE qdb_error_t qdb_log_remove_callback | ( | qdb_log_callback_id | callback_id | ) |
Removes a previously added log callback.
callback_id | The identifier set by qdb_log_add_callback that will determine which callback to remove. |