56 std::optional<std::string>
Group;
58 std::size_t Burst = 0;
60 std::size_t SampleN = 0;
61 std::size_t WindowKeep = 0;
62 std::size_t WindowPeriod = 0;
207 std::size_t count = 0;
208 bool keep_first =
false;
255 std::size_t columns = 16;
Public streaming facade for the StormByte logger.
Definition log.hxx:65
Logger module of the StormByte suite.
Log & nohumanreadable(Log &log) noexcept
Disable human-readable formatting (raw numbers).
constexpr HexManip hex
Enable hex dumps with 16 bytes per row.
Definition manipulators.hxx:270
Log & humanreadable_bytes(Log &log) noexcept
Enable human-readable formatting for byte counts.
ComponentManip component(std::string name)
Select the component associated with subsequent log lines on this thread.
ThrottlePolicy
Count policy applied before the optional rate bucket.
Definition manipulators.hxx:40
@ Drop
Admit while the rate bucket has credit.
@ Sample
Admit the first and then one line of every sample period.
@ Window
Admit the first WindowKeep lines of every WindowPeriod.
Log & noredact(Log &log) noexcept
Disable redaction until the next redact / redact(n) / redact_first(n).
constexpr RedactManip redact_first(std::size_t n) noexcept
Build a manipulator that keeps the first n characters visible.
Definition manipulators.hxx:231
constexpr RedactManip redact
Full redaction manipulator (mask everything).
Definition manipulators.hxx:224
GroupManip group(std::string name)
Set the producer group for the current line.
constexpr NoHexManip nohex
Disable hex dumps for subsequent payloads.
Definition manipulators.hxx:281
Log & humanreadable_number(Log &log) noexcept
Enable human-readable formatting for numeric values.
constexpr NoColorManip nocolor
Disable color for subsequent content in the current line.
Definition manipulators.hxx:186
FormatManip push_format(std::string format)
Save the current format and activate a temporary format.
Color
ANSI foreground colors supported by the logger.
Definition typedefs.hxx:37
constexpr ResetComponentManip reset_component
Clear the current thread's component.
Definition manipulators.hxx:113
constexpr PopFormatManip pop_format
Restore the most recently saved format, or do nothing if empty.
Definition manipulators.hxx:153
constexpr ColorManip color
Restore the configured color for the current level.
Definition manipulators.hxx:175
constexpr PopComponentManip pop_component
Pop one component segment from the current thread's stack.
Definition manipulators.hxx:127
Temporarily selects a configured or explicit content color.
Definition manipulators.hxx:159
std::optional< Color > value
Explicit color, or empty for the configured level color.
Definition manipulators.hxx:160
constexpr ColorManip operator()(Color selected) const noexcept
Select an explicit color for subsequent content.
Definition manipulators.hxx:167
Selects the sticky component for the current thread.
Definition manipulators.hxx:88
std::string name
Component name; empty selects the root component.
Definition manipulators.hxx:89
Labels the current logging line with a producer group.
Definition manipulators.hxx:69
std::string name
Group name; an empty name clears the current group.
Definition manipulators.hxx:70
Dump subsequent payloads as hex bytes until nohex.
Definition manipulators.hxx:254
constexpr HexManip operator()(std::size_t n) const noexcept
Build a manipulator with n bytes per row.
Definition manipulators.hxx:262
Disables color for subsequent content until changed.
Definition manipulators.hxx:181
Disable hex dumps and restore default payload formatting.
Definition manipulators.hxx:276
Pops one segment from the current thread's component stack.
Definition manipulators.hxx:121
Stateful redaction manipulator.
Definition manipulators.hxx:206
constexpr RedactManip operator()(std::size_t n) const noexcept
Build a manipulator that keeps the last n characters visible.
Definition manipulators.hxx:215
Clears the component associated with the current thread.
Definition manipulators.hxx:107
Immutable rule description used by Log::Throttle.
Definition manipulators.hxx:53
std::optional< Level > Level
Optional level selector.
Definition manipulators.hxx:55
std::optional< std::string > Group
Optional group selector.
Definition manipulators.hxx:56
std::optional< std::string > Component
Optional component selector.
Definition manipulators.hxx:54
#define STORMBYTE_LOGGER_PUBLIC
Definition visibility.h:28