This class provides a function object that formats a log record as JSON text elements and renders them to an output stream. The overloaded operator() provided by the class formats log record according to a message format specification supplied either by setJsonFormat or setSimplifiedFormat manipulator or the default format installed by the constructor) and outputs the result to the stream. While this functor type is designed to match the function signature expected by many concrete ball::Observer implementations that publish log records (for example, see ball::FileObserver2::setLogFileFunctor) it is advised to use the more flexible scheme‐based format selection provided now by every BDE‐made observer.
Synopsis
Declared in <ball_recordjsonformatter.h>
class RecordJsonFormatter;
Type Aliases
Name |
Description |
|
|
This |
Enums
Name |
Description |
Enumerator to determine the syntax of the specification string. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Assignment operators |
|
|
DEPRECATED: Use |
Return the message format specification of this record JSON formatter. See {`Record Format Specification`}. Note that the syntax of this string depends on |
|
Return the message format specification syntax of this record JSON formatter. See {`Record Format Specification`}. |
|
Return the allocator used by this object to supply memory. |
|
Format the specified |
|
Return the record separator of this record JSON formatter. |
|
DEPRECATED: Use |
|
Set the message format specification (see {`Record Format Specification`}) of this record JSON formatter to the specified JSON‐syntax |
|
Set the record separator for this record JSON formatter to the specified |
|
Parse the simplified format specification (see {`Simplified Record Format Specification`}) in the specified `format` and configure this formatter accordingly. Return 0 on success, and a non‐zero value otherwise. |
|
Set the time zone default for every "timestamp" output without a timezone specified in the format string to the specified |
|
Get the time zone default setting. |
Static Member Functions
Name |
Description |
This class method configures a formatter for the "json" scheme using the specified |
|
This class method configures a formatter for the "qjson" scheme using the specified |
Non-Member Functions
Name |
Description |
Return |
|
Return |
Created with MrDocs