Scanbot SDK
Loading...
Searching...
No Matches
Functions
Scanbot C SDK Logger

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_logging (bool enable)
 Enable or disable logging.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_log_handler (void(*log_handler)(const char *message))
 Sets the log handler.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_reset_log_handler ()
 Resets any previously set log handler.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_log_error (const char *message)
 Logs an error message using the Scanbot SDK logger.
 

Detailed Description

Function Documentation

◆ scanbotsdk_log_error()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_log_error ( const char *  message)

Logs an error message using the Scanbot SDK logger.

Parameters
messageThe error message, a null terminated string.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_reset_log_handler()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_reset_log_handler ( )

Resets any previously set log handler.

Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_set_log_handler()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_log_handler ( void(*)(const char *message)  log_handler)

Sets the log handler.

Parameters
log_handlerA pointer to the new log handler function.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_set_logging()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_set_logging ( bool  enable)

Enable or disable logging.

By default logging is enabled and logs will be written to the console. Call scanbotsdk_set_log_handler to set a custom log handler.

Parameters
enableTrue to enable logging, false to disable logging
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered