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}
95
96void configure_logging(const LoggingConfig & config) {
97 std::lock_guard<std::mutex> lock(logger_mutex());
98 auto & state = logger_state();
99 logger_enabled_flag().store(false, std::memory_order_release);
100 if (state.file_path != config.file_path) {
101 state.file_stream.reset();
102 }
103 state.file_path = config.file_path;
104 if (config.enabled && state.file_path.has_value() && !state.file_path->empty()) {
105 (void)logger_output_locked(state);
106 }
107 logger_enabled_flag().store(config.enabled, std::memory_order_release);
108}
109
110void reset_logging() {
111 configure_logging(LoggingConfig{});

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