libosdp_sys

Function osdp_logger_init

Source
pub unsafe extern "C" fn osdp_logger_init(
    name: *const c_char,
    log_level: c_int,
    puts_fn: osdp_log_puts_fn_t,
)
Expand description

@brief Configure OSDP Logging.

@param name A soft name for this module; will appear in all the log lines. @param log_level OSDP log levels of type enum osdp_log_level_e. Default is LOG_INFO. @param puts_fn A puts() like function that will be invoked to write the log buffer. Can be handy if you want to log to file on a UART device without putchar redirection. See osdp_log_puts_fn_t definition to see the behavioral expectations. When this is set to NULL, LibOSDP will log to stderr.

Note: This function has to be called before osdp_{cp,pd}_setup(). Otherwise it will be ignored.