|
| | ThreadedLog (std::ostream &out, const Level &level=Level::Info, std::string_view format="[%L] %T") |
| | Construct a ThreadedLog writing to out.
|
| |
| | ThreadedLog (const ThreadedLog &)=default |
| | Copy constructor.
|
| |
| | ThreadedLog (ThreadedLog &&) noexcept=default |
| | Move constructor.
|
| |
| | ~ThreadedLog () noexcept override |
| | Destructor.
|
| |
| ThreadedLog & | operator= (const ThreadedLog &) |
| | Copy assignment.
|
| |
| ThreadedLog & | operator= (ThreadedLog &&) noexcept |
| | Move assignment.
|
| |
| Log & | Color (const Level &level, const StormByte::Logger::Color &color) override |
| | Set a level color while holding the line lock.
|
| |
| StormByte::Logger::Color | Color (const Level &level) const override |
| | Get the configured color for a logging level.
|
| |
| Log & | Color (std::string_view component, const Level &level, const StormByte::Logger::Color &color) override |
| | Set a component color override under the line lock.
|
| |
| StormByte::Logger::Color | Color (std::string_view component, const Level &level) const override |
| | Get a component color, falling back along the path then to the general color.
|
| |
| Log & | Format (std::string_view format) override |
| | Set the header format under the line lock.
|
| |
| StormByte::String::String | Format () const override |
| | Get the effective current header format.
|
| |
| Log & | Format (std::string_view component, std::string_view format) override |
| | Set or remove a component-specific header format under the line lock.
|
| |
| StormByte::String::String | Format (std::string_view component) const override |
| | Get a component-specific format, falling back along the path then to general.
|
| |
| Log & | Throttle (const ThrottleSpec &spec) override |
| | Install a throttle rule under the line lock.
|
| |
| Log & | NoThrottle (const ThrottleSpec &spec) override |
| | Remove a throttle rule under the line lock.
|
| |
| Log & | Throttle (double rate, std::size_t burst) override |
| | Install a Drop rule.
|
| |
| Log & | Throttle (double rate, std::size_t burst, ThrottlePolicy policy, std::size_t value, std::size_t period=0) override |
| | Install a Sample or Window rule.
|
| |
| Log & | Throttle (const Level &level, double rate, std::size_t burst) override |
| | Install a level-scoped Drop rule.
|
| |
| Log & | Throttle (GroupManip group, double rate, std::size_t burst) override |
| | Install a group-scoped Drop rule.
|
| |
| Log & | Throttle (ComponentManip component, double rate, std::size_t burst) override |
| | Install a component-scoped Drop rule.
|
| |
| Log & | Throttle (ComponentManip component, const Level &level, GroupManip group, double rate, std::size_t burst, ThrottlePolicy policy=ThrottlePolicy::Drop, std::size_t value=0, std::size_t period=0) override |
| | Install an exact component/level/group rule.
|
| |
| Log & | NoThrottle () override |
| | Remove all throttle rules.
|
| |
| Log & | NoThrottle (const Level &level) override |
| | Remove a level-scoped rule.
|
| |
| Log & | NoThrottle (GroupManip group) override |
| | Remove a group-scoped rule.
|
| |
| Log & | NoThrottle (ComponentManip component) override |
| | Remove a component-scoped rule.
|
| |
| Log & | NoThrottle (ComponentManip component, const Level &level, GroupManip group) override |
| | Remove an exact component/level/group rule.
|
| |
| Log & | FlushThrottle () override |
| | Flush all dropped summaries under the line lock.
|
| |
| Log & | FlushThrottle (const ThrottleSpec &spec) override |
| | Flush matching dropped summaries under the line lock.
|
| |
| | Log (std::ostream &out, const Level &level=Level::Info, std::string_view format="[%L] %T") |
| | Construct a Log writing to out.
|
| |
| | Log (const Log &)=default |
| | Copy constructor.
|
| |
| | Log (Log &&) noexcept=default |
| | Move constructor.
|
| |
| | ~Log () noexcept override |
| | Destructor.
|
| |
| Log & | operator= (const Log &) |
| | Copy assignment.
|
| |
| Log & | operator= (Log &&) noexcept |
| | Move assignment.
|
| |
| PointerType | Scope (std::string_view path) |
| | Another facade on the same backend, with a sticky component path.
|
| |
| bool | Enabled (const Level &level) const noexcept |
| | Whether level would be emitted given the print floor.
|
| |
template<typename T >
requires ( (StormByte::Type::Arithmetic<std::decay_t<T>> && !StormByte::Type::SameAs<std::decay_t<T>, wchar_t>) || StormByte::Type::SameAs<std::decay_t<T>, std::string_view> || StormByte::Type::SameAs<std::decay_t<T>, const char*> || StormByte::Type::SameAs<std::decay_t<T>, char*> ) |
| Log & | operator<< (const T &v) |
| | Stream a numeric or narrow-text payload.
|
| |
| Log & | operator<< (const StormByte::CString &v) |
| | Stream owned UTF-8 bytes.
|
| |
| Log & | operator<< (const StormByte::String::String &v) |
| | Stream owned UTF-8 text.
|
| |
| Log & | operator<< (std::wstring_view v) |
| | Stream wide text.
|
| |
| Log & | operator<< (const wchar_t *v) |
| | Stream a wide C string.
|
| |
| Log & | operator<< (const StormByte::WCString &v) |
| | Stream owned wide bytes.
|
| |
| Log & | operator<< (const StormByte::String::WString &v) |
| | Stream owned wide text.
|
| |
| Log & | operator<< (std::span< const std::byte > v) |
| | Stream raw bytes.
|
| |
| Log & | operator<< (const StormByte::BinaryData &v) |
| | Stream owned bytes.
|
| |
| Log & | operator<< (const StormByte::Size &v) |
| | Stream a byte count.
|
| |
| Log & | operator<< (const StormByte::ByteSize &v) |
| | Stream an octet count.
|
| |
| Log & | operator<< (const Level &level) |
| | Set the level of the current line.
|
| |
| Log & | operator<< (std::ostream &(*manip)(std::ostream &)) |
| | Apply a stream manipulator (e.g.
|
| |
| Log & | operator<< (Log &(*manip)(Log &) noexcept) |
| | Apply a Log manipulator.
|
| |
| Log & | operator<< (RedactManip m) |
| | Apply redaction policy.
|
| |
| Log & | operator<< (HexManip m) |
| | Dump subsequent payloads as hex bytes until nohex.
|
| |
| Log & | operator<< (NoHexManip m) |
| | Disable hex dumps.
|
| |
| Log & | operator<< (ColorManip manip) |
| | Apply a configured or explicit content color.
|
| |
| Log & | operator<< (NoColorManip manip) |
| | Disable color for subsequent content.
|
| |
| Log & | operator<< (FormatManip manip) |
| | Save the current format and activate a temporary format.
|
| |
| Log & | operator<< (PopFormatManip manip) |
| | Restore the most recently saved format.
|
| |
| Log & | operator<< (GroupManip manip) |
| | Set the producer group for the current line.
|
| |
| Log & | operator<< (ComponentManip manip) |
| | Push a component segment onto the current thread's stack.
|
| |
| Log & | operator<< (PopComponentManip manip) |
| | Pop one component segment from the current thread's stack.
|
| |
| Log & | operator<< (ResetComponentManip manip) |
| | Clear the current thread's component stack.
|
| |
|
| PointerType | Clone () const override |
| | Deep-copy this facade into a StormByte::Shared.
|
| |
| PointerType | Move () override |
| | Move this facade into a StormByte::Shared.
|
| |
| bool | BeginPayload () override |
| | Admit a payload and take the line lock.
|
| |
| void | Write (std::wstring_view v) override |
| | Encode wide text before taking the line lock.
|
| |
| void | Write (const wchar_t *v) override |
| | Encode a wide C string before taking the line lock.
|
| |
| void | Write (std::span< const std::byte > v) override |
| | Format raw bytes before taking the line lock.
|
| |
| void | Write (const Level &level) override |
| | Forward a level change under the line lock.
|
| |
| void | Write (std::ostream &(*manip)(std::ostream &)) override |
| | Forward a stream manipulator; newline drops the line lock.
|
| |
| void | Write (Log &(*manip)(Log &) noexcept) override |
| | Forward a Log manipulator under the line lock.
|
| |
| void | Write (RedactManip m) override |
| | Apply redaction state under the line lock.
|
| |
| void | Write (HexManip m) override |
| | Apply hex-dump state under the line lock.
|
| |
| void | Write (NoHexManip m) override |
| | Disable hex dumps under the line lock.
|
| |
| void | Write (ColorManip manip) override |
| | Apply a color manipulator under the line lock.
|
| |
| void | Write (NoColorManip manip) override |
| | Apply a no-color manipulator under the line lock.
|
| |
| void | Write (FormatManip manip) override |
| | Apply a push-format manipulator under the line lock.
|
| |
| void | Write (PopFormatManip manip) override |
| | Apply a pop-format manipulator under the line lock.
|
| |
| | ThreadedLog (SinkWrite write, SinkManip manip, void *context, const Level &level, std::string_view format) |
| | Construct a threaded logger that emits through caller callbacks.
|
| |
| | Log (SinkWrite write, SinkManip manip, void *context, const Level &level, std::string_view format) |
| | Construct a logger that emits through caller callbacks.
|
| |
| bool | WillWrite () const noexcept |
| | Whether the current line level will be written.
|
| |
| bool | PrepareLine () |
| | Decide throttle admission before a payload claims a line lock.
|
| |
| bool | HasOpenOutputLine () const noexcept |
| | Whether output has already started for the current line.
|
| |
| bool | LineDecided () const noexcept |
| | Whether throttle has already decided the current line.
|
| |
| bool | LineAdmitted () const noexcept |
| | Whether the decided current line is admitted.
|
| |
| template<typename T > |
| void | WriteValue (const T &v) |
| | Forward a payload after BeginPayload.
|
| |
| virtual void | Write (GroupManip manip) |
| | Forward a group manipulator.
|
| |
| virtual void | Write (ComponentManip manip) |
| | Forward a component push manipulator.
|
| |
| virtual void | Write (PopComponentManip manip) |
| | Forward a component pop manipulator.
|
| |
| virtual void | Write (ResetComponentManip manip) |
| | Forward a reset-component manipulator.
|
| |
| constexpr | Clonable ()=default |
| |
| constexpr | Clonable (const Clonable &)=default |
| |
| constexpr | Clonable (Clonable &&) noexcept=default |
| |
| constexpr Clonable & | operator= (const Clonable &)=default |
| |
| constexpr Clonable & | operator= (Clonable &&) noexcept=default |
| |
| virtual constexpr | ~Clonable () noexcept=default |
| |
Thread-safe logging facade.
Serializes logical lines (until a newline manipulator) so concurrent writers do not interleave. Filtered messages do not hold the line lock.
Payload operator<< is inherited from Log. Numeric and narrow-text payloads call Log::WriteValue, which uses BeginPayload. This class only overrides BeginPayload plus the Writes that must run work before the lock or that drop the lock on newline.
Scope clones this type and shares both the Engine and the line lock.