MCPcopy Create free account
hub / github.com/SNAS/openbmp / parseDebug

Method parseDebug

Server/src/Config.cpp:315–363  ·  view source on GitHub ↗

* Parse the debug configuration * * \param [in] node Reference to the yaml NODE */

Source from the content-addressed store, hash-verified

313 * \param [in] node Reference to the yaml NODE
314 */
315void Config::parseDebug(const YAML::Node &node) {
316 if (!debug_general and node["general"]) {
317 try {
318 debug_general = node["general"].as<bool>();
319
320 if (debug_general)
321 std::cout << " Config: debug general : " << debug_general << std::endl;
322
323 } catch (YAML::TypedBadConversion<bool> err) {
324 printWarning("debug.general is not of type boolean", node["general"]);
325 }
326 }
327
328 if (!debug_bmp and node["bmp"]) {
329 try {
330 debug_bmp = node["bmp"].as<bool>();
331
332 if (debug_general)
333 std::cout << " Config: debug bmp : " << debug_bmp << std::endl;
334
335 } catch (YAML::TypedBadConversion<bool> err) {
336 printWarning("debug.bmp is not of type boolean", node["bmp"]);
337 }
338 }
339
340 if (!debug_bgp and node["bgp"]) {
341 try {
342 debug_bgp = node["bgp"].as<bool>();
343
344 if (debug_general)
345 std::cout << " Config: debug bgp : " << debug_bgp << std::endl;
346
347 } catch (YAML::TypedBadConversion<bool> err) {
348 printWarning("debug.bgp is not of type boolean", node["bgp"]);
349 }
350 }
351
352 if (!debug_msgbus and node["msgbus"]) {
353 try {
354 debug_msgbus = node["msgbus"].as<bool>();
355
356 if (debug_general)
357 std::cout << " Config: debug msgbus : " << debug_msgbus << std::endl;
358
359 } catch (YAML::TypedBadConversion<bool> err) {
360 printWarning("debug.msgbus is not of type boolean", node["msgbus"]);
361 }
362 }
363}
364
365/**
366 * Parse the kafka configuration

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected