| 116 | } |
| 117 | |
| 118 | void log_message(std::string_view line) { |
| 119 | if (!log_enabled()) { |
| 120 | return; |
| 121 | } |
| 122 | std::lock_guard<std::mutex> lock(logger_mutex()); |
| 123 | if (!log_enabled()) { |
| 124 | return; |
| 125 | } |
| 126 | auto & state = logger_state(); |
| 127 | auto & output = logger_output_locked(state); |
| 128 | output << line << "\n"; |
| 129 | output.flush(); |
| 130 | } |
| 131 | |
| 132 | void log_message(LogLevel level, std::string_view category, std::string_view message) { |
| 133 | if (!log_enabled()) { |
no test coverage detected