MCPcopy Create free account
hub / github.com/apache/trafficserver / config_diags_norecords

Method config_diags_norecords

src/proxy/shared/DiagsConfig.cc:212–252  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////// void Diags::config_norecords() Builds the Diags data structures based on the command line values it does not use any of the records based config variables /////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

210//
211//////////////////////////////////////////////////////////////////////////////
212void
213DiagsConfig::config_diags_norecords()
214{
215 DiagsConfigState c;
216 ink_zero(c);
217
218 //////////////////////////////
219 // clear out old tag tables //
220 //////////////////////////////
221 _diags->deactivate_all(DiagsTagType_Debug);
222 _diags->deactivate_all(DiagsTagType_Action);
223
224 //////////////////////////////////////////////////////////////////////
225 // add new tag tables from command line overrides only //
226 //////////////////////////////////////////////////////////////////////
227
228 if (_diags->base_debug_tags) {
229 _diags->activate_taglist(_diags->base_debug_tags, DiagsTagType_Debug);
230 c.enabled(DiagsTagType_Debug, 1);
231 } else {
232 c.enabled(DiagsTagType_Debug, 0);
233 }
234
235 if (_diags->base_action_tags) {
236 _diags->activate_taglist(_diags->base_action_tags, DiagsTagType_Action);
237 c.enabled(DiagsTagType_Action, 1);
238 } else {
239 c.enabled(DiagsTagType_Action, 0);
240 }
241
242 // Route all outputs to stderr by default until reconfigured with records.yaml
243 for (auto &o : c.outputs) {
244 o.to_stderr = true;
245 }
246
247#if !defined(__GNUC__)
248 _diags->config = c;
249#else
250 memcpy(((void *)&_diags->config), ((void *)&c), sizeof(DiagsConfigState));
251#endif
252}
253
254DiagsConfig::DiagsConfig(std::string_view prefix_string, const char *filename, const char *tags, const char *actions,
255 bool use_records)

Callers

nothing calls this directly

Calls 5

ink_zeroFunction · 0.85
deactivate_allMethod · 0.80
activate_taglistMethod · 0.80
memcpyFunction · 0.50
enabledMethod · 0.45

Tested by

no test coverage detected