#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 );
gr_application_register_log_cb function will register a handler with the application that will be called when a log message is generated.
Parameters: app A pointer to the application handle created using gr_application_create_args. cb The function that should be called to when a log message is generated. udata User data that will be passed to the handler when the log message is sent. old_cb Storage for the previous log callback. This can be NULL. old_udata Storage for the previous user data. This can be NULL. Returns: 0 if the registeration is a sucess and -1 if the registration fails.
gr_application_register_log_cb provides a way for user code to register a function that will be called when a log message is generated by the engine.