Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
kcenon::logger::structured Namespace Reference

Classes

class  basic_structured_logger
 
class  json_formatter
 JSON formatter for structured logs. More...
 
class  log_builder
 Builder for structured log entries. More...
 
struct  structured_log_entry
 Structured log entry. More...
 
class  structured_logger_interface
 Structured logger interface. More...
 

Typedefs

using log_value = std::variant<std::string, int, double, bool>
 Value type for structured logging.
 
using structured_output_callback = std::function<void(log_level, const std::string&)>
 Output callback type for structured logger.
 

Enumerations

enum class  structured_format { json , logfmt }
 Output format for structured logs. More...
 

Typedef Documentation

◆ log_value

using kcenon::logger::structured::log_value = std::variant<std::string, int, double, bool>

◆ structured_output_callback

using kcenon::logger::structured::structured_output_callback = std::function<void(log_level, const std::string&)>

Output callback type for structured logger.

Examples
/home/runner/work/logger_system/logger_system/include/kcenon/logger/structured/structured_logger.h.

Definition at line 135 of file structured_logger.h.

Enumeration Type Documentation

◆ structured_format

Output format for structured logs.

Enumerator
json 
logfmt 
Examples
/home/runner/work/logger_system/logger_system/include/kcenon/logger/structured/structured_logger.h.

Definition at line 127 of file structured_logger.h.

127 {
128 json, // JSON format
129 logfmt // key=value format (Heroku/logfmt style)
130};
@ logfmt
Logfmt key=value format.
@ json
JSON structured format.