quasardb C API
Loading...
Searching...
No Matches
Functions
Logging-related operations

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.
 
QDB_API_LINKAGE qdb_error_t qdb_log_remove_callback (qdb_log_callback_id callback_id)
 Removes a previously added log 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).
 

Detailed Description

Function Documentation

◆ qdb_log_add_callback()

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.

Parameters
cbA callback of type qdb_log_callback. The callback will be called every time the API emits a log message.
callback_idA pointer to a unique callback identifier that can be used to remove the callback.
Returns
A qdb_error_t code indicating success or failure.
See also
qdb_log_callback, qdb_log_remove_callback

◆ qdb_log_option_is_sync()

QDB_API_LINKAGE int qdb_log_option_is_sync ( void  )

Indicates if logs are synchronized for each API call (disabled by default).

Returns
1 if logs are flushed before returning from each API call, 0 otherwise.
Warning
This function is still under development. Performance and compatibility are not guaranteed.

◆ qdb_log_option_set_sync()

QDB_API_LINKAGE void qdb_log_option_set_sync ( int  sync_logger)

Set logs to be synchronous for each API call (disabled by default).

Parameters
sync_logger1 if logs must be flushed before returning from each API call, 0 otherwise.
Warning
This function is still under development. Performance and compatibility are not guaranteed.

◆ qdb_log_remove_callback()

QDB_API_LINKAGE qdb_error_t qdb_log_remove_callback ( qdb_log_callback_id  callback_id)

Removes a previously added log callback.

Parameters
callback_idThe identifier set by qdb_log_add_callback that will determine which callback to remove.
Returns
A qdb_error_t code indicating success or failure.
See also
qdb_log_callback, qdb_log_add_callback