structuredlog#
Fully qualified name: omni::structuredlog
-
namespace structuredlog#
Structured logging and Telemetry.
Classes#
- Allocator
A memory allocator interface, which can be overwritten with your custom allocator.
- BasicStringView
An extension of carb::cpp::basic_string_view that can handle nullptr and
std::basic_string
as inputs.- BinaryBlobSizeCalculator
A helper class to calculate the required size of a binary blob.
- BlobReader
A class to read binary blobs produced by the BlobWriter .
- BlobWriter
A class to build a binary blob.
- BlockAllocator
An implementation of Allocator which will just allocate from a preallocated block of memory and never deallocate memory until the full preallocated block is freed.
- IStructuredLog
Main structured log interface.
- IStructuredLogControl
Structured log state control interface.
- IStructuredLogControl_abi
Structured log state control interface.
- IStructuredLogExtraFields
Interface to manage extra CloudEvent fields to be included in each emitted message.
- IStructuredLogExtraFields_abi
Interface to manage extra CloudEvent fields to be included in each emitted message.
- IStructuredLogFromILog
This interface controls the ability to send Carbonite and Omniverse logging through the structured log system.
- IStructuredLogFromILog_abi
This interface controls the ability to send Carbonite and Omniverse logging through the structured log system.
- IStructuredLogSettings
Structured log settings interface.
- IStructuredLogSettings2
Interface for the second version of the IStructuredLogSettings interface.
- IStructuredLogSettings2_abi
Interface for the second version of the IStructuredLogSettings interface.
- IStructuredLogSettings3
Interface for the third version of the IStructuredLogSettings interface.
- IStructuredLogSettings3_abi
Interface for the third version of the IStructuredLogSettings interface.
- IStructuredLogSettings_abi
Structured log settings interface.
- IStructuredLog_abi
Main structured log interface.
- JsonBuilder
A class to build JSON trees using JsonNode structs.
- JsonConsumer
An interface for consuming the output JSON from the JsonSerializer .
- JsonLengthCounter
An implementation of JsonConsumer that just counts the length of the output string.
- JsonPrinter
An implementation of JsonConsumer that just prints to a fixed string.
- JsonSerializer
A utility that allows you to easily encode JSON data.
- JsonTreeSizeCalculator
Class for determining the allocation size required to build a JSON tree in a single block of memory.
- TempJsonNode
A temporary JsonNode object that will be cleaned up at the end of a scope.
Enumerations#
- IdMode
Names to control how the next event identifier is generated after each event message.
- IdType
Names to control what type of event identifiers will be used for each message.
- JsonTreeCompareFuzz
Options to do a less of a strict comparison when comparing trees.
- uint8_t NodeType
The data type contained within a JsonNode .
- SchemaResult
Possible results from registering a new schema.
- TelemetryMode
The tag that is applied to structuredlog messages.
Functions#
- void addModulesSchemas() noexcept
A function that registers all schemas within a module.
- void clearJsonTree(JsonNode *node, Allocator *alloc)
Free any memory allocated to a JsonNode and clear it out to an empty node.
- bool compareJsonTrees(const JsonNode *a, const JsonNode *b, JsonTreeCompareFuzz fuzz=JsonTreeCompareFuzz::eStrict)
Perform a deep comparison of two nodes.
- void configureStructuredLogging(carb::settings::ISettings *settings)
Checks the settings registry for structured log settings and makes them active.
- constexpr const char * getSchemaResultName(SchemaResult result)
Retrieves a string containing the name of a SchemaResult value.
- void ignoreJsonTreeSerializerValidationError(const char *s)
Default value for the onValidationError template parameter.
- bool serializeArray(JsonSerializerType *serial, const JsonNodeType *root, const T *constVal, BlobReaderType *reader)
Serialize an array type from a JSON tree.
- bool serializeEnum(JsonSerializerType *serial, const JsonNodeType *root, T *enumChoices, BlobReaderType *reader)
- bool serializeJsonTree(JsonSerializerType *serial, const JsonNodeType *root, BlobReaderType *reader)
Serialize JSON using a JsonNode as the schema and a binary blob to read data.
- bool serializeJsonTree(JsonSerializerType *serial, const JsonNodeType *root, const void *blob, size_t blobSize)
Serialize JSON using a JsonNode as the schema and a binary blob to read data.
- bool serializeScalar(JsonSerializerType *serial, const JsonNodeType *root, T constVal, BlobReaderType *reader)
Serialize a scalar type from a JSON tree.
- bool setStructuredLogLoggingEnabled(bool enabled=true)
Enables or disables the structured logging log message redirection.
Namespaces#
Structs#
Typedefs#
- AllocFlags
Base type for flags to control how new events are allocated.
- AllocHandle
Base type for the handle to an allocated block of memory returned from either the IStructuredLog::allocSchema() or IStructuredLog::allocEvent() functions.
- EnableFlags
Base type for flags to control how events and schemas are enabled or disabled.
- EventFlags
Base type for flags to control the behavior of processing a single event.
- EventId
Base type for a unique ID of a registered event.
- ExtraFieldFlags
Base type for flags that control how extra field flags are specified or retrieved in omni::structuredlog::IStructuredLogExtraFields::getExtraCloudEventField() and omni::structuredlog::IStructuredLogExtraFields::setExtraCloudEventField().
- OnBlobWriterValidationErrorFunc
The prototype of the function to call when a validation error occurs.
- OnValidationErrorFunc
The prototype of the function to call when a validation error occurs.
- OutputFlags
Base type for the ouptut flags for the structured logging system.
- ParserVersion
Base type for the version of the event payload parser to use.
- PrivacyLoadFlags
Base type for the flags for that can be passed in the flags parameter to the omni::structuredlog::IStructuredLogSettings::loadPrivacySettingsFromFile() function.
- SchemaAddFn
Registration function to install a schema with the structured logging system.
- SchemaFlags
Base type for flags to control the behavior of the handling of a schema as a whole.
- SessionId
Base type for a session ID.
- StringView
String view for
char
strings.
Variables#
- constexpr AllocFlags fAllocFlagOnlyQueue
Flag to indicate that the event should only be added to the queue on commit but that the consumer thread should not be started yet if it is not already running.
- constexpr EnableFlags fEnableFlagAll
Flag to indicate that an enable state change should affect the entire system, not just one schema or event.
- constexpr EnableFlags fEnableFlagOverrideEnableState
Flag to indicate that the enable state of each event in a schema should be overridden when the fEnableFlagWholeSchema flag is also used.
- constexpr EnableFlags fEnableFlagWholeSchema
Flag to indicate that a call to IStructuredLog::setEnabled() should affect the entire schema that the named event ID belongs to instead of just the event.
- constexpr EventFlags fEventFlagCriticalEvent
Flag to indicate that this event is critical to succeed and should potentially block the calling thread on IStructuredLog::allocEvent() calls if the event queue is full.
- constexpr EventFlags fEventFlagOutputToStderr
Flag to indicate that this event should be output to the stderr file.
- constexpr EventFlags fEventFlagOutputToStdout
Flag to indicate that this event should be output to the stdout file.
- constexpr EventFlags fEventFlagSkipLog
Flag to indicate that this event should not be output to the schema's specified log file.
- constexpr EventFlags fEventFlagUseLocalLog
Use the log file specified by the owning event's schema instead of the default log for the process.
- constexpr ExtraFieldFlags fExtraFieldFlagNone
Value to indicate that no special flags are being specified.
- constexpr OutputFlags fOutputFlagEmitCloudHeartbeat
Flag to indicate that the cloud heartbeat events should be emitted as well as the normal heartbeat events.
- constexpr OutputFlags fOutputFlagNone
Special flag value to indicate that no output flags are being specified.
- constexpr OutputFlags fOutputFlagPayloadOnly
Flag to indicate that only emit the payload portion of each message as the full output instead of including the CloudEvents wrapper as well.
- constexpr OutputFlags fOutputFlagSkipLogHeaders
Flag to indicate that no header should be written out to log files created by the structured logging system.
- constexpr PrivacyLoadFlags fPrivacyLoadFlagResetSettings
Flag to indicate that the privacy settings keys that the privacy settings that could affect user privacy functionality should be explicitly reset to their default values before loading the new privacy file.
- constexpr SchemaFlags fSchemaFlagKeepLogOpen
Flag to indicate that the log file should remain open between messages.
- constexpr SchemaFlags fSchemaFlagLogWithProcessId
Flag to indicate that the log file for this schema should include the process ID in the filename.
- constexpr EventId kAllSchemas
A special value to indicate that an operation should affect all registered schemas.
- constexpr const char * kAnonymousUserIdModeSetting
The setting path that will indicate which type of anonymous user ID will be used in cases where no user ID is provided in the
privacy.toml
file or theprivacy.toml
file is missing.- constexpr EventId kBadEventId
A special value to indicate a bad event identifier.
- constexpr bool kBlobReaderNoValidate
- constexpr bool kBlobReaderValidate
- constexpr bool kBlobWriterNoValidate
- constexpr bool kBlobWriterValidate
- constexpr const char * kDefaultAnonymousUserIdMode
The default mode for how a random user ID is chosen.
- constexpr bool kDefaultEmitCloudHeartbeat
The default state for whether the cloud heartbeat events will be emitted.
- constexpr bool kDefaultEmitPayloadOnlySettings
The default state for whether the CloudEvents wrapper will be output with each message.
- constexpr bool kDefaultEnableJsonStdout
The default enable mode for the 'JSON on stdout' feature.
- constexpr size_t kDefaultEventQueueSize
The default value for the event queue size in bytes.
- constexpr uint64_t kDefaultHeartbeatPeriod
The default minimum time between heartbeat events in seconds.
- constexpr IdMode kDefaultIdMode
The default mode for generating event IDs.
- constexpr IdType kDefaultIdType
The default type of event ID to generate.
- constexpr const char * kDefaultLogNameSetting
The default log name to use.
- constexpr EventId kDefaultLogPathEvent
A special name to request the log file path for the default log (if set).
- constexpr const char * kDefaultLogPathName
A special name for the default log output path.
- constexpr size_t kDefaultLogRetentionCount
The default log retention setting.
- constexpr int64_t kDefaultLogSizeLimit
Constants for default and minimum values for various settings.
- constexpr bool kDefaultNeedLogHeaders
The default state for whether headers will be added to each written log file.
- constexpr int64_t kDefaultQueueHighWaterMark
The default high water mark for the queue.
- constexpr const char * kEmitCloudHeartbeatSetting
The setting path that will indicate whether the cloud heartbeat events will be enabled.
- constexpr const char * kEmitPayloadOnlySettings
The setting path that will indicate whether the CloudEvents wrapper should be added to the payload of each emitted event.
- constexpr const char * kEnableJsonStdoutSetting
The setting path that indicates whether the 'JSON on stdout' functionality is enabled or not.
- constexpr const char * kEnableLogConsumerSetting
The setting path for the log consumer toggle.
- constexpr const char * kEventIdModeSetting
The setting path for the event identifier mode.
- constexpr const char * kEventIdTypeSetting
The setting path for the event identifier data type.
- constexpr const char * kEventQueueSizeSetting
The setting path for the size of the event queue buffer in kilobytes.
- constexpr const char * kEventsStateArraySetting
The setting path to an array that will contain zero or more values that will be used to disable or enable events when they are first registered.
- constexpr const char * kEventsStateListSetting
The setting path that will contain zero or more keys that will be used to disable events when they are first registered.
- constexpr const char * kExtraFieldsSettingBranch
The settings branch that will be expected to contain zero or more key/value pairs for extra fields to be added to each output message.
- constexpr const char * kGlobalEnableSetting
Names for various settings that can be used to override some of the default settings.
- constexpr uint64_t kHeartbeatDisabled
Special value to indicate that the heartbeat event should be disabled.
- constexpr const char * kHeartbeatPeriodSetting
The setting path that will contain the minimum number of seconds between heartbeat events A heartbeat event is one that is sent periodically to help calculate session lengths even if the expected 'exit' or 'crash' process lifetime events are missing.
- constexpr const char * kLogDirectory
Specifies the directory that log files should be written to.
- constexpr const char * kLogRetentionCountSetting
The setting path for the log retention count.
- constexpr const char * kLogSizeLimitSetting
The setting path for the log size limit in megabytes.
- constexpr size_t kMaxEventQueueSize
The maximum allowed event queue size in bytes.
- constexpr size_t kMaxMessageLength
Approximate size of the maximum data payload in bytes that a message can contain that can be transmitted in a single message.
- constexpr size_t kMaxMessageLengthBase64
Approximate size of the maximum data payload in bytes that a message can contain that can be transmitted in a single message when the payload is encoded in Base64.
- constexpr size_t kMinEventQueueSize
The minimum allowed event queue size in bytes.
- constexpr size_t kMinLogRetentionCount
The minimum allowed log retention setting.
- constexpr int64_t kMinLogSizeLimit
The minimum value that can be set for the log size limit in bytes.
- constexpr const char * kNeedLogHeadersSetting
The setting path that will indicate whether headers will be added to each log file that is written to disk.
- constexpr size_t kNullTerminatedString
A special string length value to indicate that a string parameter to a generated event sending function is null terminated and should have its length calculated instead of passing in an explicit length.
- constexpr ParserVersion kParserVersion
The current event payload parser version that will be used in the IStructuredLog interface.
- constexpr const char * kPrivacyFileSetting
The setting path for the privacy settings file to load.
- constexpr const char * kQueueHighWaterMark
This sets the point where omni.structuredlog will decide that the queue is overfilled and will automatically increase the queue size.
- constexpr size_t kRecommendedLoggingEventQueueSize
The recommended size for the event queue when log redirection is enabled.
- constexpr const char * kSchemasStateArraySetting
The setting path to an array that will contain zero or more values that will be used to disable or enable schemas when they are first registered.
- constexpr const char * kSchemasStateListSetting
The setting path that will contain zero or more keys that will be used to disable schemas when they are first registered.
- constexpr const char * kSchemasThroughputLimitsSetting
This is the path for settings tree that contains the set of schemas or wildcards to set the maximum allowable throughput measured in bytes per second.
- constexpr const char * kSchemasThroughputPeriodSetting
This is the path for settings tree that contains the set of schemas or wildcards to set the time period (in milliseconds) for the throughput limits defined by kSchemasThroughputLimitsSetting .
- constexpr const char * kStructuredLogPluginName
The expected base name for the structured log plugin.