StormByte-Logger 3.0.0
C++26 logger module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Logger::ThrottleSpec Struct Reference

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

#include <StormByte/logger/manipulators.hxx>

Collaboration diagram for StormByte::Logger::ThrottleSpec:

Public Attributes

StormByte::Safe::Optional< StormByte::Safe::String > Component
 Optional component selector.
StormByte::Safe::Optional< StormByte::Logger::Level > Level
 Optional level selector.
StormByte::Safe::Optional< StormByte::Safe::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

StormByte::Safe::Optional<StormByte::Safe::String> StormByte::Logger::ThrottleSpec::Component

Optional component selector.

◆ Group

StormByte::Safe::Optional<StormByte::Safe::String> StormByte::Logger::ThrottleSpec::Group

Optional group selector.

◆ Level

StormByte::Safe::Optional<StormByte::Logger::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: