MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / configure_logging

Function configure_logging

src/framework/debug/trace.cpp:96–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94 return "warning";
95 case LogLevel::Error:
96 return "error";
97 }
98 return "unknown";
99}
100
101void configure_logging(const LoggingConfig & config) {
102 std::lock_guard<std::mutex> lock(logger_mutex());
103 auto & state = logger_state();
104 logger_enabled_flag().store(false, std::memory_order_release);
105 state.config_enabled = config.enabled;
106 if (state.file_path != config.file_path) {
107 state.file_stream.reset();
108 }
109 state.file_path = config.file_path;
110 if (config.enabled && state.file_path.has_value() && !state.file_path->empty()) {
111 (void)logger_output_locked(state);

Callers 12

reset_loggingFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

resetMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected