StormByte C++ Library: Logger module 1.2.0
StormByte-Logger is the logging module of the StormByte C++ suite.
Loading...
Searching...
No Matches
Public Attributes | List of all members
StormByte::Logger::ThrottleSpec Struct Reference

Immutable rule description used by Log::Throttle. More...

#include <StormByte/logger/manipulators.hxx>

Public Attributes

std::optional< std::string > Component
 Optional component selector.
 
std::optional< LevelLevel
 Optional level selector.
 
std::optional< std::string > Group
 Optional group selector.
 
double Rate = 0.0
 Lines per second; zero disables refill.
 
std::size_t Burst = 0
 Initial and maximum token capacity.
 
ThrottlePolicy Policy = ThrottlePolicy::Drop
 Count policy.
 
std::size_t SampleN = 0
 Sample period when Policy is Sample.
 
std::size_t WindowKeep = 0
 Kept lines when Policy is Window.
 
std::size_t WindowPeriod = 0
 Window size when Policy is Window.
 

Detailed Description

Immutable rule description used by Log::Throttle.

An absent Component, Level or Group is a wildcard. An engaged empty Component or Group selects the root/empty key.

Member Data Documentation

◆ Burst

std::size_t StormByte::Logger::ThrottleSpec::Burst = 0

Initial and maximum token capacity.

◆ Component

std::optional<std::string> StormByte::Logger::ThrottleSpec::Component

Optional component selector.

◆ Group

std::optional<std::string> StormByte::Logger::ThrottleSpec::Group

Optional group selector.

◆ Level

std::optional<Level> StormByte::Logger::ThrottleSpec::Level

Optional level selector.

◆ Policy

ThrottlePolicy StormByte::Logger::ThrottleSpec::Policy = ThrottlePolicy::Drop

Count policy.

◆ Rate

double StormByte::Logger::ThrottleSpec::Rate = 0.0

Lines per second; zero disables refill.

◆ SampleN

std::size_t StormByte::Logger::ThrottleSpec::SampleN = 0

Sample period when Policy is Sample.

◆ WindowKeep

std::size_t StormByte::Logger::ThrottleSpec::WindowKeep = 0

Kept lines when Policy is Window.

◆ WindowPeriod

std::size_t StormByte::Logger::ThrottleSpec::WindowPeriod = 0

Window size when Policy is Window.


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