|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Base logger abstract class. More...
#include <BaseLogger.h>
Public Member Functions | |
| virtual | ~BaseLogger () noexcept=default |
| Virtual destructor. | |
| virtual hf_logger_err_t | Initialize (const hf_logger_config_t &config) noexcept=0 |
| Initialize the logger. | |
| virtual hf_logger_err_t | Deinitialize () noexcept=0 |
| Deinitialize the logger. | |
| virtual bool | IsInitialized () const noexcept=0 |
| Check if logger is initialized. | |
| virtual bool | EnsureInitialized () noexcept=0 |
| Ensure logger is initialized (lazy initialization) | |
| virtual hf_logger_err_t | SetLogLevel (const char *tag, hf_log_level_t level) noexcept=0 |
| Set log level for a specific tag. | |
| virtual hf_logger_err_t | GetLogLevel (const char *tag, hf_log_level_t &level) const noexcept=0 |
| Get log level for a specific tag. | |
| virtual hf_logger_err_t | Error (const char *tag, const char *format,...) noexcept=0 |
| Log a message at ERROR level. | |
| virtual hf_logger_err_t | Warn (const char *tag, const char *format,...) noexcept=0 |
| Log a message at WARN level. | |
| virtual hf_logger_err_t | Info (const char *tag, const char *format,...) noexcept=0 |
| Log a message at INFO level. | |
| virtual hf_logger_err_t | Debug (const char *tag, const char *format,...) noexcept=0 |
| Log a message at DEBUG level. | |
| virtual hf_logger_err_t | Verbose (const char *tag, const char *format,...) noexcept=0 |
| Log a message at VERBOSE level. | |
| virtual hf_logger_err_t | Log (hf_log_level_t level, const char *tag, const char *format,...) noexcept=0 |
| Log a message at specified level. | |
| virtual hf_logger_err_t | LogV (hf_log_level_t level, const char *tag, const char *format, va_list args) noexcept=0 |
| Log a message with va_list (for internal use) | |
| virtual hf_logger_err_t | LogWithLocation (hf_log_level_t level, const char *tag, const char *file, hf_u32_t line, const char *function, const char *format,...) noexcept=0 |
| Log a message with file and line information. | |
| virtual hf_logger_err_t | Flush () noexcept=0 |
| Flush any buffered output. | |
| virtual bool | IsLevelEnabled (hf_log_level_t level, const char *tag=nullptr) const noexcept=0 |
| Check if a log level is enabled for a tag. | |
| virtual hf_logger_err_t | GetStatistics (hf_logger_statistics_t &statistics) const noexcept=0 |
| Get logger statistics. | |
| virtual hf_logger_err_t | GetDiagnostics (hf_logger_diagnostics_t &diagnostics) const noexcept=0 |
| Get logger diagnostics. | |
| virtual hf_logger_err_t | ResetStatistics () noexcept=0 |
| Reset statistics. | |
| virtual hf_logger_err_t | ResetDiagnostics () noexcept=0 |
| Reset diagnostics. | |
| virtual bool | IsHealthy () const noexcept=0 |
| Check if logger is healthy. | |
| virtual hf_logger_err_t | GetLastError () const noexcept=0 |
| Get last error code. | |
| virtual hf_logger_err_t | GetLastErrorMessage (char *message, hf_u32_t max_length) const noexcept=0 |
| Get last error message. | |
| virtual hf_logger_err_t | PrintStatistics (const char *tag=nullptr, bool detailed=true) const noexcept=0 |
| Print statistics to log output. | |
| virtual hf_logger_err_t | PrintDiagnostics (const char *tag=nullptr, bool detailed=true) const noexcept=0 |
| Print diagnostics to log output. | |
| virtual hf_logger_err_t | PrintStatus (const char *tag=nullptr, bool detailed=true) const noexcept=0 |
| Print both statistics and diagnostics. | |
Protected Member Functions | |
| BaseLogger ()=default | |
| Default constructor. | |
| BaseLogger (const BaseLogger &)=delete | |
| Copy constructor (deleted) | |
| BaseLogger & | operator= (const BaseLogger &)=delete |
| Assignment operator (deleted) | |
| BaseLogger (BaseLogger &&)=delete | |
| Move constructor (deleted) | |
| BaseLogger & | operator= (BaseLogger &&)=delete |
| Move assignment operator (deleted) | |
Base logger abstract class.
This class provides a comprehensive logging abstraction that supports:
|
virtualdefaultnoexcept |
Virtual destructor.
|
protecteddefault |
Default constructor.
|
protecteddelete |
Copy constructor (deleted)
|
protecteddelete |
Move constructor (deleted)
|
pure virtualnoexcept |
Log a message at DEBUG level.
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Ensure logger is initialized (lazy initialization)
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message at ERROR level.
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get logger diagnostics.
| diagnostics | Output diagnostics structure |
Implemented in StmLogger.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get last error message.
| message | Output error message buffer |
| max_length | Maximum message length |
Implemented in StmLogger.
|
pure virtualnoexcept |
Get log level for a specific tag.
| tag | Log tag (nullptr for default) |
| level | Output log level |
Implemented in StmLogger.
|
pure virtualnoexcept |
Get logger statistics.
| statistics | Output statistics structure |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message at INFO level.
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
Initialize the logger.
| config | Logger configuration |
Implemented in StmLogger.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Check if logger is initialized.
Implemented in StmLogger.
|
pure virtualnoexcept |
Check if a log level is enabled for a tag.
| level | Log level to check |
| tag | Log tag (nullptr for default) |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message at specified level.
| level | Log level |
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message with va_list (for internal use)
| level | Log level |
| tag | Log tag |
| format | printf-style format string |
| args | va_list of arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message with file and line information.
| level | Log level |
| tag | Log tag |
| file | Source file |
| line | Source line |
| function | Function name |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
protecteddelete |
Move assignment operator (deleted)
|
protecteddelete |
Assignment operator (deleted)
|
pure virtualnoexcept |
Print diagnostics to log output.
| tag | Log tag for the output (optional, uses implementation-specific default if nullptr) |
| detailed | If true, prints detailed diagnostic information |
Implemented in StmLogger.
|
pure virtualnoexcept |
Print statistics to log output.
| tag | Log tag for the output (optional, uses implementation-specific default if nullptr) |
| detailed | If true, prints detailed per-level statistics |
Implemented in StmLogger.
|
pure virtualnoexcept |
Print both statistics and diagnostics.
| tag | Log tag for the output (optional, uses implementation-specific default if nullptr) |
| detailed | If true, prints detailed information |
Implemented in StmLogger.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Set log level for a specific tag.
| tag | Log tag (nullptr for default) |
| level | Log level |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message at VERBOSE level.
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.
|
pure virtualnoexcept |
Log a message at WARN level.
| tag | Log tag |
| format | printf-style format string |
| ... | printf-style arguments |
Implemented in StmLogger.