MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / setLoggingLevelFromString

Function setLoggingLevelFromString

lib/common/spdlog.cpp:67–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65void setCriticalLoggingLevel() { spdlog::set_level(spdlog::level::critical); }
66
67bool setLoggingLevelFromString(std::string_view Level) {
68 if (Level == "off"sv) {
69 setLogOff();
70 return true;
71 }
72 if (Level == "trace"sv) {
73 setTraceLoggingLevel();
74 return true;
75 }
76 if (Level == "debug"sv) {
77 setDebugLoggingLevel();
78 return true;
79 }
80 if (Level == "info"sv) {
81 setInfoLoggingLevel();
82 return true;
83 }
84 if (Level == "warning"sv || Level == "warn"sv) {
85 setWarnLoggingLevel();
86 return true;
87 }
88 if (Level == "error"sv) {
89 setErrorLoggingLevel();
90 return true;
91 }
92 if (Level == "fatal"sv || Level == "critical"sv) {
93 setCriticalLoggingLevel();
94 return true;
95 }
96 return false;
97}
98
99void setLoggingCallback(
100 std::function<void(const spdlog::details::log_msg &)> Callback) {

Callers 1

UniToolFunction · 0.85

Calls 7

setLogOffFunction · 0.85
setTraceLoggingLevelFunction · 0.85
setDebugLoggingLevelFunction · 0.85
setInfoLoggingLevelFunction · 0.85
setWarnLoggingLevelFunction · 0.85
setErrorLoggingLevelFunction · 0.85
setCriticalLoggingLevelFunction · 0.85

Tested by

no test coverage detected