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
| Parameter | Type | Description |
|---|---|---|
app | gr_application_t* | A pointer to the application handle created using gr_application_create_args. |
cb | gr_log_writer_cb_t | The function that should be called to when a log message is generated. |
udata | void* | User data that will be passed to the handler when the log message is sent. |
old_cb | gr_log_writer_cb_t* | Storage for the previous log callback. This can be NULL. |
old_udata | void** | Storage for the previous user data. This can be NULL. |
Returns
| Type | Description |
|---|---|
int | 0 if the registration is a success and -1 if the registration fails. |