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

Data structures for representing log entries and source locations kcenon. More...

#include <string>
#include <chrono>
#include <optional>
#include <unordered_map>
#include <variant>
#include <cstdint>
#include "../core/small_string.h"
#include <kcenon/common/interfaces/logger_interface.h>
#include <kcenon/logger/otlp/otel_context.h>
Include dependency graph for log_entry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::logger::source_location
 Source code location information for debugging. More...
 
struct  kcenon::logger::log_entry
 Represents a single log entry with all associated metadata. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Typedefs

using kcenon::logger::log_value = std::variant<std::string, int64_t, double, bool>
 Value type for structured logging fields.
 
using kcenon::logger::log_fields = std::unordered_map<std::string, log_value>
 Type alias for structured fields map.
 

Detailed Description

Data structures for representing log entries and source locations kcenon.

Since
1.0.0

This file defines the core data structures used to represent log messages throughout the logging system. The structures are optimized for performance using small string optimization (SSO) and move semantics.

Note
The log_entry structure is move-only to avoid unnecessary copying of log messages, which improves performance in high-throughput scenarios.

Definition in file log_entry.h.