Logger System 1.0.0
High-performance C++20 thread-safe logging system with asynchronous capabilities
Loading...
Searching...
No Matches
raw_formatter.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2025, kcenon
3// See the LICENSE file in the project root for full license information.
4
5#pragma once
6
30
31namespace kcenon::logger {
32
40public:
41 raw_formatter() = default;
42 ~raw_formatter() override = default;
43
44 std::string format(const log_entry& entry) const override {
45 return entry.message.to_string();
46 }
47
48 std::string get_name() const override {
49 return "raw_formatter";
50 }
51};
52
53} // namespace kcenon::logger
Abstract interface for log message formatters.
Formatter that returns log_entry.message verbatim.
std::string get_name() const override
~raw_formatter() override=default
std::string format(const log_entry &entry) const override
Format a log entry to a string.
std::string to_string() const
Convert to std::string.
Data structures for representing log entries and source locations kcenon.
Interface for log message formatters (Strategy Pattern) kcenon.
Represents a single log entry with all associated metadata.
Definition log_entry.h:155
small_string_256 message
The actual log message.
Definition log_entry.h:169