#include <userver/logging/log_extra.hpp>
Extra tskv fields storage.
Definition at line 48 of file log_extra.hpp.
Public Types | |
| enum class | ExtendType { kNormal , kFrozen } |
| Specifies replacement policy for newly added values. More... | |
| using | Value |
| using | Key = std::string |
| using | Pair = std::pair<Key, Value> |
| using | ValueView |
| using | InitializerList = std::initializer_list<std::pair<std::string_view, ValueView>> |
Public Member Functions | |
| LogExtra (const LogExtra &) | |
| LogExtra (LogExtra &&) | |
| LogExtra & | operator= (LogExtra &&) |
| LogExtra & | operator= (const LogExtra &) |
| LogExtra (InitializerList initial, ExtendType extend_type=ExtendType::kNormal) | |
| Constructs LogExtra containing an initial batch of key-value pairs. | |
| void | Extend (std::string key, Value value, ExtendType extend_type=ExtendType::kNormal) |
| Adds a single key-value pair. | |
| void | Extend (Pair extra, ExtendType extend_type=ExtendType::kNormal) |
| Adds a single key-value pair. | |
| void | Extend (InitializerList extra, ExtendType extend_type=ExtendType::kNormal) |
| Adds a batch of key-value pairs. | |
| void | Extend (const LogExtra &extra) |
| Merges contents of other LogExtra with existing key-value pairs preserving freeze states. | |
| void | Extend (LogExtra &&extra) |
| Merges contents of other LogExtra with existing key-value pairs preserving freeze states. | |
| template<typename Iterator> | |
| void | ExtendRange (Iterator first, Iterator last, ExtendType extend_type=ExtendType::kNormal) |
| Adds a range of key-value pairs. | |
| void | SetFrozen (std::string_view key) |
| Marks specified value as frozen, all attempts to overwrite it will be silently ignored. | |
Static Public Member Functions | |
| static LogExtra | StacktraceNocache () noexcept |
| Creates a LogExtra with current thread's stacktrace if the default log level is less or equal to DEBUG. | |
| static LogExtra | StacktraceNocache (logging::LoggerRef logger) noexcept |
| Creates a LogExtra with current thread's stacktrace if the logger log level is less or equal to DEBUG. | |
| static LogExtra | Stacktrace () noexcept |
| Creates a LogExtra with current thread's stacktrace if the logger log level is less or equal to DEBUG. Uses cache for faster stacktrace symbolization. | |
| static LogExtra | Stacktrace (logging::LoggerRef logger) noexcept |
| Creates a LogExtra with current thread's stacktrace if the logger log level is less or equal to DEBUG. Uses cache for faster stacktrace symbolization. | |
| using logging::LogExtra::InitializerList = std::initializer_list<std::pair<std::string_view, ValueView>> |
Definition at line 78 of file log_extra.hpp.
| using logging::LogExtra::Key = std::string |
Definition at line 62 of file log_extra.hpp.
| using logging::LogExtra::Pair = std::pair<Key, Value> |
Definition at line 63 of file log_extra.hpp.
| using logging::LogExtra::Value |
Definition at line 50 of file log_extra.hpp.
| using logging::LogExtra::ValueView |
Definition at line 65 of file log_extra.hpp.
|
strong |
Specifies replacement policy for newly added values.
| Enumerator | |
|---|---|
| kNormal | Added value can be replaced. |
| kFrozen | Attempts to replace this value will be ignored. |
Definition at line 81 of file log_extra.hpp.
|
inline |
Adds a range of key-value pairs.
Definition at line 140 of file log_extra.hpp.
|
friend |
Definition at line 149 of file log_extra.hpp.
|
friend |
Definition at line 152 of file log_extra.hpp.
|
friend |
Definition at line 153 of file log_extra.hpp.