|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Structured error context for debugging. More...
#include <error_handling_utils.h>

Public Member Functions | |
| error_context (logger_error_code error_code, std::string error_message, std::string op="", std::string file="", int line=0) | |
| Construct error context with manual location information. | |
| std::string | to_string () const |
| Convert error context to a formatted string. | |
Public Attributes | |
| logger_error_code | code |
| std::string | message |
| std::string | operation |
| std::string | source_file |
| int | source_line |
| std::string | function_name |
| std::chrono::system_clock::time_point | timestamp |
Structured error context for debugging.
Provides additional context information for errors to aid in debugging and troubleshooting. This context can be used to track where and when errors occurred.
When C++20 source_location is available, location information is captured automatically. Otherwise, it can be provided manually.
Definition at line 42 of file error_handling_utils.h.
|
inline |
Construct error context with manual location information.
| error_code | The logger error code |
| error_message | Detailed error message |
| op | Operation being performed (optional) |
| file | Source file name (optional) |
| line | Source line number (optional) |
Definition at line 80 of file error_handling_utils.h.
|
inline |
Convert error context to a formatted string.
Definition at line 99 of file error_handling_utils.h.
References code, function_name, kcenon::logger::logger_error_to_string(), message, operation, source_file, and source_line.
Referenced by kcenon::logger::utils::log_error_context().


| logger_error_code kcenon::logger::utils::error_context::code |
Definition at line 43 of file error_handling_utils.h.
Referenced by to_string().
| std::string kcenon::logger::utils::error_context::function_name |
Definition at line 48 of file error_handling_utils.h.
Referenced by to_string().
| std::string kcenon::logger::utils::error_context::message |
Definition at line 44 of file error_handling_utils.h.
Referenced by to_string().
| std::string kcenon::logger::utils::error_context::operation |
Definition at line 45 of file error_handling_utils.h.
Referenced by to_string().
| std::string kcenon::logger::utils::error_context::source_file |
Definition at line 46 of file error_handling_utils.h.
Referenced by to_string().
| int kcenon::logger::utils::error_context::source_line |
Definition at line 47 of file error_handling_utils.h.
Referenced by to_string().
| std::chrono::system_clock::time_point kcenon::logger::utils::error_context::timestamp |
Definition at line 49 of file error_handling_utils.h.