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

Configuration for a sanitization rule. More...

#include <log_sanitizer.h>

Collaboration diagram for kcenon::logger::security::sanitization_rule:
Collaboration graph

Public Member Functions

 sanitization_rule (std::string n, const std::string &p, std::string r, bool pp=false)
 

Public Attributes

std::string name
 Identifier for the rule.
 
std::regex pattern
 Regex pattern to match.
 
std::string replacement
 Replacement text or pattern.
 
bool preserve_partial
 Keep last N characters visible.
 

Detailed Description

Configuration for a sanitization rule.

Definition at line 53 of file log_sanitizer.h.

Constructor & Destructor Documentation

◆ sanitization_rule()

kcenon::logger::security::sanitization_rule::sanitization_rule ( std::string n,
const std::string & p,
std::string r,
bool pp = false )
inline
Examples
/home/runner/work/logger_system/logger_system/include/kcenon/logger/security/log_sanitizer.h.

Definition at line 59 of file log_sanitizer.h.

60 : name(std::move(n))
61 , pattern(p, std::regex::icase | std::regex::optimize)
62 , replacement(std::move(r))
63 , preserve_partial(pp) {}
std::string name
Identifier for the rule.
std::regex pattern
Regex pattern to match.
std::string replacement
Replacement text or pattern.
bool preserve_partial
Keep last N characters visible.

Member Data Documentation

◆ name

std::string kcenon::logger::security::sanitization_rule::name

◆ pattern

std::regex kcenon::logger::security::sanitization_rule::pattern

◆ preserve_partial

bool kcenon::logger::security::sanitization_rule::preserve_partial

Keep last N characters visible.

Examples
/home/runner/work/logger_system/logger_system/include/kcenon/logger/security/log_sanitizer.h.

Definition at line 57 of file log_sanitizer.h.

◆ replacement

std::string kcenon::logger::security::sanitization_rule::replacement

The documentation for this struct was generated from the following file: