Defines a simple interface against structured data item.
More...
#include "uril/structureddata.h"
|
using | ParameterList = std::vector<std::pair<std::string, std::string>> |
|
void | Identity (const std::string &identity) |
| Sets the identifier for the data item;.
|
const std::string & | Identity () const |
| Returns the data raw identifier.
|
const std::string & | IdentityStem () const |
| Return the main (stem) part of the identifier.
|
const std::string & | EnterpriseId () const |
| Returns the enterprise ID.
|
const ParameterList & | Parameters () const |
| Returns a list of name value pairs.
|
void | AddParameter (const std::string &name, const std::string &value) |
| Adds a name value pair.
|
A structured data item is used to tag extra information onto a syslog message. The item has a unique identifier and one or more name value pairs.
◆ ParameterList
The list holds name value pairs. The name and values are always strings.
◆ AddParameter()
void util::syslog::StructuredData::AddParameter |
( |
const std::string & | name, |
|
|
const std::string & | value ) |
Adds a new name value pair. The name and values are always strings.
- Parameters
-
name | Name of value. |
value | The value. |
◆ EnterpriseId()
const std::string & util::syslog::StructuredData::EnterpriseId |
( |
| ) |
const |
|
inlinenodiscard |
The identifier may be split into 2 parts. The at symbol ('@'), is used as token that divide the stem and the enterprise ID.
- Returns
- The enterprise ID.
◆ Identity() [1/2]
const std::string & util::syslog::StructuredData::Identity |
( |
| ) |
const |
|
inlinenodiscard |
- Returns
- Raw message structured data name.
◆ Identity() [2/2]
void util::syslog::StructuredData::Identity |
( |
const std::string & | identity | ) |
|
Sets the identifier for the structure data.
- Parameters
-
◆ IdentityStem()
const std::string & util::syslog::StructuredData::IdentityStem |
( |
| ) |
const |
|
inlinenodiscard |
The identifier may be split into 2 parts. The at symbol ('@'), is used as token that divide the stem and the enterprise ID.
- Returns
- The stem part of the identifier.
◆ Parameters()
const ParameterList & util::syslog::StructuredData::Parameters |
( |
| ) |
const |
|
inlinenodiscard |
Returns the list of name value pairs belonging to this data item.
- Returns
- List of name value pairs
The documentation for this class was generated from the following file: