BDE 4.39.x Production Release
Loading...
Searching...
No Matches
ball::RecordFormatterRegistryUtil Struct Reference

#include <ball_recordformatterregistryutil.h>

Detailed Description

This utility provides a namespace for functions to create log record formatters based on URI-like scheme identifiers.

See ball_recordformatterregistryutil

Static Public Member Functions

static int createRecordFormatter (RecordFormatterFunctor::Type *result, const bsl::string_view &format, const RecordFormatterOptions &formatOptions)
 

Static Public Attributes

static const bsl::string_view k_FALLBACK_LOG_FORMAT_URI
 

Member Function Documentation

◆ createRecordFormatter()

static int ball::RecordFormatterRegistryUtil::createRecordFormatter ( RecordFormatterFunctor::Type result,
const bsl::string_view format,
const RecordFormatterOptions formatOptions 
)
static

Load, into the specified result a formatter functor that formats as instructed by the specified format and formatOptions. The format may start with a URI-like scheme (e.g., "qjson://") that selects both the formatter (class) and the syntax of the format specification that follows the scheme. In case format does not start with a scheme the "text://" scheme is assumed. Return 0 if the requested log record formatter was successfully created and loaded into result. Otherwise, if results is empty, load a default/fallback-formatter into result`, with the requested scheme if that exists or with a sensible fallback text log format otherwise. For further details on behavior in case of errors see {Behavior with Invalid Formats}. This method currently supports the "text", "qjson", and "json" schemes.

Member Data Documentation

◆ k_FALLBACK_LOG_FORMAT_URI

const bsl::string_view ball::RecordFormatterRegistryUtil::k_FALLBACK_LOG_FORMAT_URI
static

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