44#include <StormByte/thread_lock.hxx>
50#include <StormByte/type_traits/safe.hxx>
339 void Write(const
wchar_t* v) override;
StormByte::Safe::Clonable< Log >::PointerType PointerType
Owner returned by Clone, Move and Scope.
Definition log.hxx:124
Log(std::ostream &out, const Level &level=Level::Info, std::string_view format="[%L] %T")
Construct a Log writing to out.
Definition log.hxx:135
PointerType Move() override
Move this facade into a StormByte::Safe::Shared.
void Write(std::wstring_view v) override
Encode wide text before taking the line lock.
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:79
ThreadedLog(SinkFunction &&callback, const Level &level=Level::Info, std::string_view format="[%L] %T")
Construct a ThreadedLog that emits through a typed creator-owned callback.
Log & Throttle(const ThrottleSpec &spec) override
Install a throttle rule under the line lock.
Log & Color(const Level &level, const StormByte::Logger::Color &color) override
Set a level color while holding the line lock.
Log & Format(std::string_view format) override
Set the header format under the line lock.
ThreadedLog(const ThreadedLog &)=default
Copy constructor.
PointerType Clone() const override
Deep-copy this facade into a StormByte::Safe::Shared.
ThreadedLog(ThreadedLog &&) noexcept=default
Move constructor.
Log & FlushThrottle() override
Flush all dropped summaries under the line lock.
ThreadedLog(StormByte::Safe::Callback &&callback, const Level &level=Level::Info, std::string_view format="[%L] %T")
Construct a ThreadedLog that emits through a Base-owned callback.
Log & NoThrottle(const ThrottleSpec &spec) override
Remove a throttle rule under the line lock.
bool BeginPayload() override
Admit a payload and take the line lock.
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Logger::Exception)
Logger module of the StormByte suite.
void(*)(void *context, std::ostream &(*manip)(std::ostream &)) SinkManip
Caller-side application of an std::ostream manipulator.
Definition typedefs.hxx:130
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:80
ThrottlePolicy
Count policy applied before the optional rate bucket.
Definition manipulators.hxx:63
StormByte::Safe::Function< void(const StormByte::Safe::String &)> SinkFunction
Typed text callback whose context is released in its creator module.
Definition typedefs.hxx:135
const ColorManip color
Restore the configured color for the current level.
Definition manipulators.hxx:264
Level
Severity levels used by the logger.
Definition typedefs.hxx:89
@ Info
Informational messages.
Definition typedefs.hxx:94
ComponentManip component(const char *name)
Select the component associated with subsequent log lines on this thread.
Definition manipulators.hxx:145
void(*)(void *context, const char *data, std::size_t size) SinkWrite
Caller-side write of raw bytes into the sink.
Definition typedefs.hxx:122
void OStreamManip(void *context, std::ostream &(*manip)(std::ostream &))
Apply an std::ostream manipulator in the caller's module.
Definition log.hxx:91
GroupManip group(const char *name)
Set the producer group for the current line.
Definition manipulators.hxx:102
Temporarily selects a configured or explicit content color.
Definition manipulators.hxx:248
Selects the sticky component for the current thread.
Definition manipulators.hxx:133
Labels the current logging line with a producer group.
Definition manipulators.hxx:92
Dump subsequent payloads as hex bytes until nohex.
Definition manipulators.hxx:346
Disables color for subsequent content until changed.
Definition manipulators.hxx:270
Disable hex dumps and restore default payload formatting.
Definition manipulators.hxx:368
Stateful redaction manipulator.
Definition manipulators.hxx:295
Immutable rule description used by Log::Throttle.
Definition manipulators.hxx:76
#define STORMBYTE_LOGGER_PUBLIC
Definition visibility.h:53