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

Log sampling implementation for high-volume scenarios kcenon. More...

#include "sampling_config.h"
#include <kcenon/logger/interfaces/log_entry.h>
#include <kcenon/logger/logger_export.h>
#include <kcenon/common/interfaces/logger_interface.h>
#include <atomic>
#include <chrono>
#include <memory>
#include <mutex>
#include <shared_mutex>
#include <optional>
Include dependency graph for log_sampler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kcenon::logger::sampling::log_sampler
 Thread-safe log sampler with multiple strategy support. More...
 
class  kcenon::logger::sampling::sampler_factory
 Factory for creating pre-configured samplers. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::logger
 
namespace  kcenon::logger::sampling
 

Detailed Description

Log sampling implementation for high-volume scenarios kcenon.

Since
3.3.0

Provides log sampling functionality to reduce log volume while preserving critical messages. Supports multiple sampling strategies:

  • Random: Simple probabilistic sampling
  • Rate Limiting: Maximum N logs per time window
  • Adaptive: Automatically adjusts based on volume
  • Hash-based: Deterministic sampling for debugging

Definition in file log_sampler.h.