|
GPS Device
|
Log subsystem public API. More...
#include "stm32f401re.h"#include "stm32f401re_usart.h"#include "stm32f401re_gpio.h"#include "err.h"#include "configuration.h"#include "modules.h"

Go to the source code of this file.
Classes | |
| struct | LOG_HANDLE_ts |
| Configuration handle for initializing the log subsystem. More... | |
Macros | |
| #define | LOG_INFO(subsys, lvl, fmt, ...) |
| #define | LOG_DEBUG(subsys, lvl, fmt, ...) |
| #define | LOG_WARNING(subsys, lvl, fmt, ...) |
| #define | LOG_ERROR(subsys, lvl, fmt, ...) |
| #define | LOG_CRITICAL(subsys, lvl, fmt, ...) |
Enumerations | |
| enum | LOG_LEVEL_te { LOG_LEVEL_INFO , LOG_LEVEL_DEBUG , LOG_LEVEL_WARNING , LOG_LEVEL_ERROR , LOG_LEVEL_CRITICAL , LOG_LEVEL_NONE , LOG_LEVEL_COUNT } |
| Log severity levels, in ascending order of severity. More... | |
Functions | |
| ERR_te | log_init (LOG_HANDLE_ts *log_handle) |
| Initializes the log subsystem. | |
| ERR_te | log_deinit (void) |
| Deinitializes the log subsystem. | |
| ERR_te | log_print (MODULES_te subsys, LOG_LEVEL_te subsys_log_level, LOG_LEVEL_te log_level, char *msg,...) |
| Prints a formatted message to the serial terminal if the severity threshold is met. | |
| ERR_te | log_get_level_name (LOG_LEVEL_te log_level, char *str) |
| Converts a LOG_LEVEL_te value to its lowercase string name. | |
| ERR_te | log_level_to_int (char const *str, LOG_LEVEL_te *log_level_o) |
| Converts a log level name string to its LOG_LEVEL_te value. | |
| ERR_te | log_set_force_disable (bool bool_status) |
| Enables or disables forced suppression of all log output. | |
Log subsystem public API.
This module provides serial logging over USART with per-message severity levels and per-subsystem log level filtering. Each log message is prefixed with an RTC timestamp, the severity level, and the originating subsystem name.
Logging is controlled at two levels:
Typical usage:
Definition in file log.h.