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

Destination of native's default output. More...

#include <SzLogging.hpp>

Public Member Functions

 SzLogOutput ()=default
 Standard error (the native default).
SzLogOutputType OutputType () const noexcept
 The kind of destination.
const std::filesystem::path & Path () const noexcept
 The file path (empty unless OutputType() is File).
bool IsAppend () const noexcept
 True for a file output that keeps existing content.
bool operator== (const SzLogOutput &other) const =default

Static Public Member Functions

static SzLogOutput Stderr ()
 Standard error (the native default).
static SzLogOutput Stdout ()
 Standard output.
static SzLogOutput Null ()
 Discard; only registered callbacks receive messages.
static SzLogOutput Callback ()
 A default callback (get-only: SetDefaultOutput rejects it).
static SzLogOutput File (std::filesystem::path filePath)
 A file output that truncates the file when it is opened (SZ_LOG_OUTPUT_FILE).
static SzLogOutput AppendFile (std::filesystem::path filePath)
 A file output that appends to the file, keeping what is already there (SZ_LOG_OUTPUT_FILE_APPEND).

Detailed Description

Destination of native's default output.

A default-constructed value is Stderr. Build one with the static factories.

Constructor & Destructor Documentation

◆ SzLogOutput()

senzing::sdk::SzLogOutput::SzLogOutput ( )
default

Standard error (the native default).

Member Function Documentation

◆ AppendFile()

SzLogOutput senzing::sdk::SzLogOutput::AppendFile ( std::filesystem::path filePath)
inlinestaticnodiscard

A file output that appends to the file, keeping what is already there (SZ_LOG_OUTPUT_FILE_APPEND).

Setting it requires Senzing >= 4.5.1/4.6.0.

◆ Callback()

SzLogOutput senzing::sdk::SzLogOutput::Callback ( )
inlinestaticnodiscard

A default callback (get-only: SetDefaultOutput rejects it).

◆ File()

SzLogOutput senzing::sdk::SzLogOutput::File ( std::filesystem::path filePath)
inlinestaticnodiscard

A file output that truncates the file when it is opened (SZ_LOG_OUTPUT_FILE).

◆ IsAppend()

bool senzing::sdk::SzLogOutput::IsAppend ( ) const
inlinenodiscardnoexcept

True for a file output that keeps existing content.

◆ Null()

SzLogOutput senzing::sdk::SzLogOutput::Null ( )
inlinestaticnodiscard

Discard; only registered callbacks receive messages.

◆ operator==()

bool senzing::sdk::SzLogOutput::operator== ( const SzLogOutput & other) const
default

◆ OutputType()

SzLogOutputType senzing::sdk::SzLogOutput::OutputType ( ) const
inlinenodiscardnoexcept

The kind of destination.

◆ Path()

const std::filesystem::path & senzing::sdk::SzLogOutput::Path ( ) const
inlinenodiscardnoexcept

The file path (empty unless OutputType() is File).

◆ Stderr()

SzLogOutput senzing::sdk::SzLogOutput::Stderr ( )
inlinestaticnodiscard

Standard error (the native default).

◆ Stdout()

SzLogOutput senzing::sdk::SzLogOutput::Stdout ( )
inlinestaticnodiscard

Standard output.


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