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

Pass-through formatter that emits the message field unchanged. More...

Include dependency graph for raw_formatter.h:

Go to the source code of this file.

Classes

class  kcenon::logger::raw_formatter
 Formatter that returns log_entry.message verbatim. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 

Detailed Description

Pass-through formatter that emits the message field unchanged.

Intended for binary payloads (e.g., encrypted entries) where the default timestamp prefix would corrupt the output. The formatter returns exactly the bytes stored in log_entry.message, with no timestamp, level, or source-location decoration.

Use with file_writer when wrapping it behind encrypted_writer:

auto file = std::make_unique<file_writer>(
"secure.log.enc",
false,
std::make_unique<raw_formatter>());
encrypted_writer writer(std::move(file), std::move(config));
Since
4.1.0

Definition in file raw_formatter.h.