|
Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
|
One log message, borrowed from native for the duration of a callback. More...
#include <SzLogging.hpp>
Public Member Functions | |
| constexpr | SzLogRecord (SzLogLevel level, std::string_view rawModule, std::string_view message, std::optional< int64_t > timestampNs=std::nullopt, std::optional< uint64_t > threadID=std::nullopt) noexcept |
| Builds a record over native's fields. | |
| constexpr SzLogLevel | Level () const noexcept |
| The message's severity. | |
| constexpr std::string_view | Module () const noexcept |
| The module name: native's module up to its last ':' (for "szstatic:82eb15f5faba9bab", "szstatic"). | |
| constexpr std::optional< std::string_view > | ThreadHash () const noexcept |
| The thread hash after the last ':' of native's module ("82eb15f5faba9bab"), if present. | |
| constexpr std::string_view | Message () const noexcept |
| The message exactly as native formatted it for this registration. | |
| constexpr std::string_view | RawModule () const noexcept |
| Native's module string, unparsed ("szstatic:82eb15f5faba9bab"). | |
| constexpr std::optional< int64_t > | TimestampNs () const noexcept |
| When native logged the message: UTC nanoseconds since the Unix epoch. | |
| std::optional< std::chrono::system_clock::time_point > | Timestamp () const |
| When native logged the message (UTC), at the platform's system_clock precision. | |
| constexpr std::optional< uint64_t > | ThreadID () const noexcept |
| OS id of the thread that logged the message. | |
| SzLogEntry | ToEntry () const |
| An owned copy, for queues and buffers. | |
One log message, borrowed from native for the duration of a callback.
The string_views point at native memory that is valid ONLY during the callback; use ToEntry() to keep an owned copy. Strings are passed through as native's bytes (UTF-8 as native produced them; never re-encoded).
The accessors are named like the C# properties they will become (Level(), Message(), ...), as SzException::ErrorCode() is; this also keeps clear of the Win32 GetMessage macro.
|
inlineconstexprnoexcept |
Builds a record over native's fields.
rawModule is native's module string ("szstatic:82eb15f5faba9bab").
|
inlinenodiscardconstexprnoexcept |
The message's severity.
|
inlinenodiscardconstexprnoexcept |
The message exactly as native formatted it for this registration.
|
inlinenodiscardconstexprnoexcept |
The module name: native's module up to its last ':' (for "szstatic:82eb15f5faba9bab", "szstatic").
|
inlinenodiscardconstexprnoexcept |
Native's module string, unparsed ("szstatic:82eb15f5faba9bab").
|
inlinenodiscardconstexprnoexcept |
The thread hash after the last ':' of native's module ("82eb15f5faba9bab"), if present.
The per-thread handle on Senzing 4.5.0: records from one thread share it.
|
inlinenodiscardconstexprnoexcept |
OS id of the thread that logged the message.
std::nullopt until Senzing >= 4.5.1 / 4.6.0; use ThreadHash() on 4.5.0.
|
inlinenodiscard |
When native logged the message (UTC), at the platform's system_clock precision.
std::nullopt until Senzing >= 4.5.1 / 4.6.0.
|
inlinenodiscardconstexprnoexcept |
When native logged the message: UTC nanoseconds since the Unix epoch.
std::nullopt until Senzing >= 4.5.1 / 4.6.0.
|
inlinenodiscard |
An owned copy, for queues and buffers.