Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
Logging and Diagnostics - Backend Adaptation

Backend vtable and registration for the logging service (ADR-005). More...

Data Structures

struct  sapi_log_backend_t
 Backend vtable: an integrator's implementation of the logging sink (ADR-005). Unlike every other OAL service, an unregistered backend is not an error here: sapi_log_write() with no backend registered silently does nothing, consistent with REQ-OAL-LOG-001 (logging must never affect caller control flow). More...

Functions

sapi_status_t sapi_log_register_backend (const sapi_log_backend_t *backend)
 Registers the backend implementation used by sapi_log_init()/ sapi_log_write() (ADR-005 section 2.1/2.5). Call once at startup.

Detailed Description

Backend vtable and registration for the logging service (ADR-005).

Function Documentation

◆ sapi_log_register_backend()

sapi_status_t sapi_log_register_backend ( const sapi_log_backend_t * backend)

Registers the backend implementation used by sapi_log_init()/ sapi_log_write() (ADR-005 section 2.1/2.5). Call once at startup.

Parameters
backendVtable of backend function pointers. Must not be NULL.
Returns
SAPI_STATUS_INVALID_PARAM if backend is NULL; SAPI_STATUS_OK otherwise. REQ-OAL-LOG-012

Global functions

Definition at line 80 of file sapi_log.c.