|
BSL v1.0.0 - 16.g9d98179
AMMOS Bundle Protocol Security Library (BSL)
|
Logging interface for the Mock BPA. More...
#include <stdbool.h>#include <stdarg.h>#include <sys/time.h>
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:Functions | |
| void | mock_bpa_LogOpen (void) |
| Opens the event log. | |
| void | mock_bpa_LogClose (void) |
| Closes the event log. | |
| int | mock_bpa_LogGetSeverity (int *severity, const char *name) |
| Interpret a text name as a severity level. | |
| void | mock_bpa_LogSetLeastSeverity (int severity) |
| Set the least severity enabled for logging. | |
| bool | mock_bpa_LogIsEnabledFor (int severity) |
| Interface for BSL_HostDescriptors_t::log_is_enabled_for. | |
| void | mock_bpa_LogEvent (const struct timeval *timestamp, int severity, const char *filename, int lineno, const char *funcname, const char *format, va_list args) |
| Interface for BSL_HostDescriptors_t::log_event. | |
Logging interface for the Mock BPA.
| void mock_bpa_LogClose | ( | void | ) |
Closes the event log.
This is a mimic to POSIX closelog()
References event_queue, mock_bpa_LogEvent_event_t::message, mock_bpa_LogEvent_event_deinit(), mock_bpa_LogEvent_event_init(), mock_bpa_LogEvent_event_t::severity, thr_sink, thr_valid, and write_log().
Referenced by main(), and suiteTearDown().
| void mock_bpa_LogEvent | ( | const struct timeval * | timestamp, |
| int | severity, | ||
| const char * | filename, | ||
| int | lineno, | ||
| const char * | funcname, | ||
| const char * | format, | ||
| va_list | args | ||
| ) |
Interface for BSL_HostDescriptors_t::log_event.
References BSL_CHKVOID, mock_bpa_LogEvent_event_t::context, event_queue, mock_bpa_LogEvent_event_t::message, mock_bpa_LogEvent_event_deinit(), mock_bpa_LogEvent_event_init(), mock_bpa_LogEvent_event_t::severity, thr_valid, and write_log().
Referenced by MockBPA_Agent_Descriptors().
| int mock_bpa_LogGetSeverity | ( | int * | severity, |
| const char * | name | ||
| ) |
Interpret a text name as a severity level.
| [out] | severity | The associated severity level. |
| [in] | name | The text name, which is case insensitive. |
References BSL_CHKERR1, and sev_names.
| bool mock_bpa_LogIsEnabledFor | ( | int | severity | ) |
Interface for BSL_HostDescriptors_t::log_is_enabled_for.
References least_severity.
Referenced by MockBPA_Agent_Descriptors().
| void mock_bpa_LogOpen | ( | void | ) |
Opens the event log.
This is a mimic to POSIX openlog()
References event_queue, mock_bpa_LogEvent_event_t::message, MOCK_BPA_LOG_QUEUE_SIZE, mock_bpa_LogEvent_event_deinit(), mock_bpa_LogEvent_event_init(), mock_bpa_LogEvent_event_t::severity, thr_sink, thr_valid, work_sink(), and write_log().
Referenced by LLVMFuzzerInitialize(), main(), and suiteSetUp().
| void mock_bpa_LogSetLeastSeverity | ( | int | severity | ) |
Set the least severity enabled for logging.
Other events will be dropped by the logging facility. This function is multi-thread safe.
| severity | The severity from a subset of the POSIX syslog values. |
References least_severity.
Referenced by LLVMFuzzerInitialize(), and suiteSetUp().