|
| #define | HF_LOGGER_ERR_LIST(X) |
| | HardFOC Logger error codes macro list.
|
| |
| #define | HF_LOGGER_ERR_ENUM(name, value, description) name = value, |
| | Generate logger error enum from macro list.
|
| |
| #define | X(NAME, VALUE, DESC) |
| |
| #define | HF_LOG_ERROR(tag, format, ...) |
| | Log at ERROR level with file and line information.
|
| |
| #define | HF_LOG_WARN(tag, format, ...) |
| | Log at WARN level with file and line information.
|
| |
| #define | HF_LOG_INFO(tag, format, ...) |
| | Log at INFO level with file and line information.
|
| |
| #define | HF_LOG_DEBUG(tag, format, ...) |
| | Log at DEBUG level with file and line information.
|
| |
| #define | HF_LOG_VERBOSE(tag, format, ...) |
| | Log at VERBOSE level with file and line information.
|
| |
| #define | HF_LOG_IF(condition, level, tag, format, ...) |
| | Conditional logging macro.
|
| |
|
| enum class | hf_logger_err_t : hf_u32_t {
LOGGER_SUCCESS = 0
, LOGGER_ERR_FAILURE = 1
, LOGGER_ERR_NOT_INITIALIZED = 2
, LOGGER_ERR_ALREADY_INITIALIZED = 3
,
LOGGER_ERR_INVALID_PARAMETER = 4
, LOGGER_ERR_NULL_POINTER = 5
, LOGGER_ERR_OUT_OF_MEMORY = 6
, LOGGER_ERR_INVALID_CONFIGURATION = 7
,
LOGGER_ERR_UNSUPPORTED_OPERATION = 8
, LOGGER_ERR_RESOURCE_BUSY = 9
, LOGGER_ERR_RESOURCE_UNAVAILABLE = 10
, LOGGER_ERR_WRITE_FAILURE = 11
,
LOGGER_ERR_OUTPUT_BUFFER_FULL = 12
, LOGGER_ERR_FORMAT_ERROR = 13
, LOGGER_ERR_ENCODING_ERROR = 14
, LOGGER_ERR_SYSTEM_ERROR = 15
,
LOGGER_ERR_PERMISSION_DENIED = 16
, LOGGER_ERR_OPERATION_ABORTED = 17
, LOGGER_ERR_NOT_SUPPORTED = 18
, LOGGER_ERR_DRIVER_ERROR = 19
,
LOGGER_ERR_INVALID_STATE = 20
, LOGGER_ERR_INVALID_ARG = 21
, LOGGER_ERR_TIMEOUT = 22
, LOGGER_ERR_BUFFER_OVERFLOW = 23
,
LOGGER_ERR_UNKNOWN = 24
} |
| |
| enum class | hf_log_level_t : hf_u8_t {
hf_log_level_t::LOG_LEVEL_NONE = 0
, hf_log_level_t::LOG_LEVEL_ERROR = 1
, hf_log_level_t::LOG_LEVEL_WARN = 2
, hf_log_level_t::LOG_LEVEL_INFO = 3
,
hf_log_level_t::LOG_LEVEL_DEBUG = 4
, hf_log_level_t::LOG_LEVEL_VERBOSE = 5
} |
| | Log levels enumeration. More...
|
| |
| enum class | hf_log_output_t : hf_u8_t {
hf_log_output_t::LOG_OUTPUT_NONE = 0
, hf_log_output_t::LOG_OUTPUT_UART = 1
, hf_log_output_t::LOG_OUTPUT_USB = 2
, hf_log_output_t::LOG_OUTPUT_FILE = 3
,
hf_log_output_t::LOG_OUTPUT_NETWORK = 4
, hf_log_output_t::LOG_OUTPUT_CUSTOM = 5
} |
| | Log output destination enumeration. More...
|
| |
| enum class | hf_log_format_t : hf_u32_t {
hf_log_format_t::LOG_FORMAT_NONE = 0
, hf_log_format_t::LOG_FORMAT_TIMESTAMP = (1U << 0)
, hf_log_format_t::LOG_FORMAT_LEVEL = (1U << 1)
, hf_log_format_t::LOG_FORMAT_TAG = (1U << 2)
,
hf_log_format_t::LOG_FORMAT_FILE_LINE = (1U << 3)
, hf_log_format_t::LOG_FORMAT_FUNCTION = (1U << 4)
, hf_log_format_t::LOG_FORMAT_THREAD_ID = (1U << 5)
, hf_log_format_t::LOG_FORMAT_COLORS = (1U << 6)
,
hf_log_format_t::LOG_FORMAT_DEFAULT = LOG_FORMAT_TIMESTAMP | LOG_FORMAT_LEVEL | LOG_FORMAT_TAG
} |
| | Log format options. More...
|
| |
Unified logging base class for all logging implementations.
This file contains the declaration of the BaseLogger abstract class, which provides a comprehensive logging abstraction that serves as the base for all logging implementations in the HardFOC system. It supports multiple log levels, configurable output destinations, thread-safe operations, and works across different hardware platforms including ESP32, STM32, and other MCUs.
- Author
- Nebiyu Tadesse
- Date
- 2025
- Copyright
- HardFOC
- Note
- This class is thread-safe and designed for concurrent access.