MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / foo

Function foo

robot/logging/driver.cpp:74–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void foo([[maybe_unused]] int value, bool use_legacy_api) {
75 if (use_legacy_api) {
76 CAF_LOG_TRACE(CAF_ARG(value));
77 CAF_LOG_DEBUG("this is a debug message");
78 CAF_LOG_DEBUG("this is another debug message with foobar(\"one\", \"two\") "
79 "; field = foobar(\"three\", \"four\")");
80 CAF_LOG_INFO("this is an info message");
81 CAF_LOG_INFO("this is another info message ; foo = bar");
82 CAF_LOG_WARNING("this is a warning message");
83 CAF_LOG_WARNING("this is another warning message ; foo = bar");
84 CAF_LOG_ERROR("this is an error message");
85 CAF_LOG_ERROR("this is another error message ; foo = bar");
86 } else {
87 using caf::logger;
88 auto trace_guard = logger::trace(app::component, "value = {}", value);
89 app::debug("this is a debug message");
90 app::debug()
91 .message("this is {} with {}", "another debug message",
92 foobar{"one", "two"})
93 .field("field", "{}", foobar{"three", "four"})
94 .send();
95 app::info("this is an info message");
96 app::info()
97 .message("this is {}", "another info message")
98 .field("foo", "bar")
99 .send();
100 app::warning("this is a warning message");
101 app::warning()
102 .message("this is {}", "another warning message")
103 .field("foo", "bar")
104 .send();
105 app::error("this is an error message");
106 app::error()
107 .message("this is {}", "another error message")
108 .field("foo", "bar")
109 .send();
110 }
111}
112
113class config : public caf::actor_system_config {
114public:

Callers 1

caf_mainFunction · 0.70

Calls 8

traceFunction · 0.85
debugFunction · 0.85
warningFunction · 0.85
fieldMethod · 0.80
infoFunction · 0.70
errorFunction · 0.70
sendMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected