Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
json_formatter.h File Reference

JSON formatter for structured logging kcenon. More...

#include "../interfaces/log_entry.h"
#include "../interfaces/log_formatter_interface.h"
#include "../utils/time_utils.h"
#include "../utils/string_utils.h"
#include <sstream>
#include <iomanip>
#include <type_traits>
#include <variant>
#include <kcenon/common/interfaces/logger_interface.h>
Include dependency graph for json_formatter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::logger::json_formatter
 JSON formatter for structured logging. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Detailed Description

JSON formatter for structured logging kcenon.

Since
1.2.0
Version
Phase 3 - Code Quality Improvement

Formats log messages as JSON objects for machine parsing and integration with log aggregation systems (ELK, Splunk, CloudWatch, etc.).

Output format: {"timestamp":"2025-11-03T14:30:15.123Z","level":"INFO","thread_id":12345,"message":"App started"}

With source location: {"timestamp":"2025-11-03T14:30:15.123Z","level":"ERROR","thread_id":12345,"message":"Failed", "file":"network.cpp","line":42,"function":"connect"}

Definition in file json_formatter.h.