|
GPS Device
|
Public functions to interact with the log subsystem. 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. | |
Public functions to interact with the log subsystem.
| ERR_te log_init | ( | LOG_HANDLE_ts * | log_handle | ) |
Initializes the log subsystem.
Configures the TX GPIO pin in alternate function mode, initializes the USART peripheral, enables transmission, and initializes the RTC dependency.
| [in] | log_handle | Pointer to the log configuration structure. |
Definition at line 56 of file log.c.


| ERR_te log_deinit | ( | void | ) |
Deinitializes the log subsystem.
Resets the USART peripheral registers to their reset values and clears the internal state.
Definition at line 85 of file log.c.

| 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.
The message is only transmitted if log_level >= subsys_log_level and force-disable is not active. Each message is preceded by a prologue containing the RTC timestamp, severity level, and subsystem name.
Supported format specifiers:
| [in] | subsys | The subsystem emitting the message. |
| [in] | subsys_log_level | The current log level threshold of the subsystem. |
| [in] | log_level | The severity level of this message. |
| [in] | msg | Printf-style format string. |
| [in] | ... | Arguments for the format specifiers in msg. |
Definition at line 99 of file log.c.

| ERR_te log_get_level_name | ( | LOG_LEVEL_te | log_level, |
| char * | str ) |
Converts a LOG_LEVEL_te value to its lowercase string name.
Writes the level name (e.g. "info", "error") into str. The caller must ensure str is large enough to hold the result and a null terminator.
| [in] | log_level | The log level to convert. |
| [out] | str | Pointer to the destination buffer. |
log_level is not a recognized valueDefinition at line 153 of file log.c.


| ERR_te log_level_to_int | ( | char const * | str, |
| LOG_LEVEL_te * | log_level ) |
Converts a log level name string to its LOG_LEVEL_te value.
Accepts the lowercase level names: "none", "info", "debug", "warning", "error", "critical". Unrecognized strings result in LOG_LEVEL_NONE being written to log_level_o.
| [in] | str | Pointer to the null-terminated level name string. |
| [out] | log_level_o | Pointer to a variable that will receive the parsed level. |
Definition at line 192 of file log.c.


| ERR_te log_set_force_disable | ( | bool | bool_status | ) |
Enables or disables forced suppression of all log output.
When force-disable is active, log_print produces no output regardless of severity level or subsystem threshold. Used by the console module to suppress log output during interactive command input.
| [in] | bool_status | true to suppress all output, false to restore normal operation. |
Definition at line 219 of file log.c.
