78 ThreadedLog(std::ostream& out,
const Level& level = Level::Info, std::string_view format =
"[%L] %T")
147 Log& Format(
std::string_view format) override;
161 Log& Format(
std::string_view component,
std::string_view format) override;
190 Log& Throttle(
double rate,
std::
size_t burst) override;
210 Log& Throttle(const
Level& level,
double rate,
std::
size_t burst) override;
248 Log& NoThrottle() override;
284 Log& FlushThrottle() override;
310 bool BeginPayload() override;
316 void Write(
std::wstring_view v) override;
322 void Write(const
wchar_t* v) override;
328 void Write(
std::span<const
std::
byte> v) override;
334 void Write(const
Level& level) override;
340 void Write(
std::ostream& (*manip)(
std::ostream&)) override;
346 void Write(
Log& (*manip)(
Log&) noexcept) override;
Public streaming facade for the StormByte logger.
Definition log.hxx:111
StormByte::Clonable< Log >::PointerType PointerType
Owner returned by Clone, Move and Scope.
Definition log.hxx:121
Thread-safe logging facade.
Definition threaded_log.hxx:70
ThreadedLog(std::ostream &out, const Level &level=Level::Info, std::string_view format="[%L] %T")
Construct a ThreadedLog writing to out.
Definition threaded_log.hxx:78
ThreadedLog(const ThreadedLog &)=default
Copy constructor.
ThreadedLog(ThreadedLog &&) noexcept=default
Move constructor.
Logger module of the StormByte suite.
void OStreamWrite(void *context, const char *data, std::size_t size)
Write raw bytes into an std::ostream owned by the caller.
Definition log.hxx:77
ThrottlePolicy
Count policy applied before the optional rate bucket.
Definition manipulators.hxx:62
void(*)(void *context, std::ostream &(*manip)(std::ostream &)) SinkManip
Caller-side application of an std::ostream manipulator.
Definition typedefs.hxx:128
Level
Severity levels used by the logger.
Definition typedefs.hxx:87
Color
ANSI foreground colors supported by the logger.
Definition typedefs.hxx:58
void(*)(void *context, const char *data, std::size_t size) SinkWrite
Caller-side write of raw bytes into the sink.
Definition typedefs.hxx:120
void OStreamManip(void *context, std::ostream &(*manip)(std::ostream &))
Apply an std::ostream manipulator in the caller's module.
Definition log.hxx:88
Temporarily selects a configured or explicit content color.
Definition manipulators.hxx:208
Selects the sticky component for the current thread.
Definition manipulators.hxx:119
Labels the current logging line with a producer group.
Definition manipulators.hxx:91
Dump subsequent payloads as hex bytes until nohex.
Definition manipulators.hxx:306
Disables color for subsequent content until changed.
Definition manipulators.hxx:230
Disable hex dumps and restore default payload formatting.
Definition manipulators.hxx:328
Stateful redaction manipulator.
Definition manipulators.hxx:255
Immutable rule description used by Log::Throttle.
Definition manipulators.hxx:75
#define STORMBYTE_LOGGER_PUBLIC
Definition visibility.h:53