Interface for logging backend implementations. More...
#include <eagine/logging/backend.hpp>
Public Member Functions | |
| virtual auto | allocator () noexcept -> memory::shared_byte_allocator=0 |
| The memory allocator used by the logger backend. | |
| virtual auto | type_id () noexcept -> identifier=0 |
| The backend type identifier. | |
| virtual auto | entry_backend (identifier source, log_event_severity severity) noexcept -> logger_backend *=0 |
| Returns a pointer to the actual backend to be used by an log_entry. More... | |
| virtual void | enter_scope (identifier scope) noexcept=0 |
| Enters logging scope. | |
| virtual void | leave_scope (identifier scope) noexcept=0 |
| Leaves logging scope. | |
| virtual void | set_description (identifier source, logger_instance_id instance, string_view display_name, string_view description) noexcept=0 |
| Sets the user-readable description for the logger object. | |
| virtual auto | begin_message (identifier source, identifier tag, logger_instance_id instance, log_event_severity severity, string_view format) noexcept -> bool=0 |
| Begins a new logging message. More... | |
| virtual void | add_nothing (identifier arg, identifier tag) noexcept=0 |
| Add valueless (name-only) argument. More... | |
| virtual void | add_identifier (identifier arg, identifier tag, identifier value) noexcept=0 |
| Add argument with identifier value. More... | |
| virtual void | add_bool (identifier arg, identifier tag, bool value) noexcept=0 |
| Add argument with boolean value. More... | |
| virtual void | add_integer (identifier arg, identifier tag, std::intmax_t value) noexcept=0 |
| Add argument with signed integer value. More... | |
| virtual void | add_unsigned (identifier arg, identifier tag, std::uintmax_t value) noexcept=0 |
| Add argument with unsigned integer value. More... | |
| virtual void | add_float (identifier arg, identifier tag, float value) noexcept=0 |
| Add argument with floating-point value. More... | |
| virtual void | add_float (identifier arg, identifier tag, float min, float value, float max) noexcept=0 |
| Add argument with floating-point value with minimum and maximum. More... | |
| virtual void | add_duration (identifier arg, identifier tag, std::chrono::duration< float > value) noexcept=0 |
| Add argument with time duration value. More... | |
| virtual void | add_string (identifier arg, identifier tag, string_view value) noexcept=0 |
| Add argument with string value. More... | |
| virtual void | add_blob (identifier arg, identifier tag, memory::const_block value) noexcept=0 |
| Add argument with BLOB value. More... | |
| template<typename T > | |
| auto | add_adapted (identifier arg, const T &value) -> std::enable_if_t< has_log_entry_adapter_v< T >> |
| Add argument with value having type adaptable to log entry. More... | |
| virtual void | finish_message () noexcept=0 |
| Finishes the current logging message. | |
| virtual void | finish_log () noexcept=0 |
| Finishes the current log. | |
| virtual void | log_chart_sample (identifier source, logger_instance_id instance, identifier series, float value) noexcept=0 |
| Adds a chart/graph sample to the log. More... | |
Public Member Functions inherited from eagine::interface< logger_backend > | |
| constexpr | interface (const interface &)=delete |
| Not copyable. | |
| auto | operator= (interface &&)=delete |
| Not move assignable. | |
| auto | operator= (const interface &)=delete |
| Not copy assignable. | |
Additional Inherited Members | |
Protected Member Functions inherited from eagine::interface< logger_backend > | |
| constexpr | interface () noexcept=default |
| Default constructible by derived. | |
| constexpr | interface (interface &&) noexcept=default |
| Move constructible by derived. | |
Interface for logging backend implementations.
|
inline |
Add argument with value having type adaptable to log entry.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
|
pure virtualnoexcept |
Add argument with BLOB value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add argument with boolean value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
|
pure virtualnoexcept |
Add argument with time duration value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add argument with floating-point value with minimum and maximum.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
| min | the minimum limit for the value. |
| max | the maximum limit for the value. |
|
pure virtualnoexcept |
Add argument with floating-point value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add argument with identifier value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add argument with signed integer value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add valueless (name-only) argument.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
|
pure virtualnoexcept |
Add argument with string value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Add argument with unsigned integer value.
| arg | the argument name identifier. |
| tag | the argument type identifier. |
| value | the value of the argument. |
Referenced by eagine::log_entry::arg().
|
pure virtualnoexcept |
Begins a new logging message.
| source | the identifier of the source logger object. |
| tag | the identifier of this message type or instance. |
| instance | unique instance id of the source logger object. |
| severity | the log level or severity of the log event. |
| format | the format string of the message. May contain argument placeholders. |
|
pure virtualnoexcept |
Returns a pointer to the actual backend to be used by an log_entry.
| source | the identifier of the source logger object. |
| severity | the log level or severity of the log event. |
|
pure virtualnoexcept |
Adds a chart/graph sample to the log.
| source | the identifier of the source logger object. |
| instance | unique instance id of the source logger object. |
| series | the identifier of the chart data series. |
| value | the sample value. |