MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / GetMetaDataRecords

Method GetMetaDataRecords

src/log/logmetadata.cpp:102–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102LogMetaData::Records LogMetaData::GetMetaDataRecords(const bool upcase_label,
103 const bool logtag_encaps) const
104{
105 Records ret;
106 for (const auto &mdc : metadata)
107 {
108 std::string label = mdc->label;
109 if (upcase_label)
110 {
111 std::transform(label.begin(),
112 label.end(),
113 label.begin(),
114 [](unsigned char c)
115 {
116 return std::toupper(c);
117 });
118 }
119 if (LogMetaDataValue::Type::LOGMETA_LOGTAG == mdc->type)
120 {
121 ret.push_back(label + "=" + mdc->GetValue(logtag_encaps));
122 }
123 else
124 {
125 ret.push_back(label + "=" + mdc->GetValue());
126 }
127 }
128 return ret;
129}
130
131
132size_t LogMetaData::size() const

Callers 2

WriteMethod · 0.80
TESTFunction · 0.80

Calls 1

GetValueMethod · 0.45

Tested by 1

TESTFunction · 0.64