Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
senzing::sdk::SzLogCallbackOptions Class Reference

Registration parameters: the callback's minimum level and the format native applies to SzLogRecord::Message(). More...

#include <SzLogging.hpp>

Public Member Functions

constexpr SzLogCallbackOptions (SzLogLevel minLevel) noexcept
 Options with minLevel and the Bare format.
constexpr SzLogCallbackOptions (SzLogLevel minLevel, SzLogFormat format) noexcept
 Options with minLevel and format.
constexpr SzLogCallbackOptions WithFormat (SzLogFormat format) const noexcept
 Returns a copy of these options with format instead.
constexpr SzLogLevel MinLevel () const noexcept
 Minimum level delivered to the callback.
constexpr SzLogFormat Format () const noexcept
 Format native applies to the message.
constexpr bool operator== (const SzLogCallbackOptions &other) const =default

Detailed Description

Registration parameters: the callback's minimum level and the format native applies to SzLogRecord::Message().

Implicitly constructible from an SzLogLevel, so logging.RegisterCallback(SzLogLevel::Info, ...) works. The default format is Bare: the record already carries the level and module, so the message needs no prefix (Legacy would stamp them a second time when the record is forwarded). Use WithFormat() to pick another.

Constructor & Destructor Documentation

◆ SzLogCallbackOptions() [1/2]

senzing::sdk::SzLogCallbackOptions::SzLogCallbackOptions ( SzLogLevel minLevel)
inlineconstexprnoexcept

Options with minLevel and the Bare format.

◆ SzLogCallbackOptions() [2/2]

senzing::sdk::SzLogCallbackOptions::SzLogCallbackOptions ( SzLogLevel minLevel,
SzLogFormat format )
inlineconstexprnoexcept

Options with minLevel and format.

Member Function Documentation

◆ Format()

SzLogFormat senzing::sdk::SzLogCallbackOptions::Format ( ) const
inlinenodiscardconstexprnoexcept

Format native applies to the message.

◆ MinLevel()

SzLogLevel senzing::sdk::SzLogCallbackOptions::MinLevel ( ) const
inlinenodiscardconstexprnoexcept

Minimum level delivered to the callback.

◆ operator==()

bool senzing::sdk::SzLogCallbackOptions::operator== ( const SzLogCallbackOptions & other) const
constexprdefault

◆ WithFormat()

SzLogCallbackOptions senzing::sdk::SzLogCallbackOptions::WithFormat ( SzLogFormat format) const
inlinenodiscardconstexprnoexcept

Returns a copy of these options with format instead.


The documentation for this class was generated from the following file: