Skip to main content
Version: 9.0.2

gr_application_register_log_cb

#include <gre/gre.h>

int gr_application_register_log_cb(
gr_application_t *app,
gr_log_writer_cb_t cb,
void *udata,
gr_log_writer_cb_t *old_cb,
void **old_udata
);

The gr_application_register_log_cb function will register a handler with the application that will be called when a log message is generated.

Parameters

ParameterTypeDescription
appgr_application_t*A pointer to the application handle created using gr_application_create_args.
cbgr_log_writer_cb_tThe function that should be called to when a log message is generated.
udatavoid*User data that will be passed to the handler when the log message is sent.
old_cbgr_log_writer_cb_t*Storage for the previous log callback. This can be NULL.
old_udatavoid**Storage for the previous user data. This can be NULL.

Returns

TypeDescription
int0 if the registration is a success and -1 if the registration fails.