Initializes the RAPLogging API from
an existing context created by a previous call to log_open().
Use
log_init_from_context to pass a logger instance to a shared library function.
Call this function before any other API in the
RAPLogging API is invoked in the shared library.
Use this sequence of calls in your main
executable to pass a logger instance to a shared library:
-
Initialize the logger as usual by invoking
log_open().
-
Get the pointer to the logger_context by
invoking log_get_context().
-
Invoke your shared library function by passing it the
logger_context pointer.
In your shared library function:
Syntax
uint16_t log_init_from_context( logger_context * ctx );
Parameters
-
logger_context * ctx –
The logger_context pointer to be used
to initialize the RAPLogging API in a shared library.
Returns
uint16_t error_code
An error code or ERR_NONE (value 0).