omni::structuredlog::kSchemasStateArraySetting

Defined in omni/structuredlog/StructuredLogSettingsUtils.h

constexpr const char *omni::structuredlog::kSchemasStateArraySetting = "/structuredLog/schemaStates"

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.

Each value in this array will have a name that matches zero or more schema names. From a .schema file, this would match the “name” property. From a JSON schema file, this would match the `#/schemaMeta/clientName` property. The schema name may be optionally prefixed by either ‘+’ or ‘-’ to enable or disable (respectively) matching schemas. Alternatively, the schema’s name may be assigned a boolean value to indicate whether it is enabled or not. If neither a ‘+’/’-’ prefix nor a boolean assignment suffix is specified, ‘enabled’ is assumed.

The names in this array either be a schema’s full name or a wildcard string that matches to zero or more schema names. In either version, the case of the non-wildcard portions of the key name is important. The wildcard characters ‘*’ (match to zero or more characters) and ‘?’ (match to exactly one character) may be used. This is only meant to be a simple wildcard filter, not a full regular expression.

For example, in a TOML file, these settings may be used to disable or enable multiple schemas:

structuredLog.schemaStates = [
    "-omni.test_schema",        # disable 'omni.test_schema' on registration.
    "omni.other_schema = true", # enable 'omni.other_schema' on registration.
    "-carb.*"                   # disable all schemas starting with 'carb.'.
]

Note

TOML does not allow static arrays such as above to be appended to with later lines. Attempting to do so will result in a parsing error.