| ... | ... | @@ -149,9 +149,15 @@ pub fn defaultLog( |
| 149 | 149 | const level_txt = comptime message_level.asText(); |
| 150 | 150 | const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): "; |
| 151 | 151 | const stderr = std.io.getStdErr().writer(); |
| 152 | var bw = std.io.bufferedWriter(stderr); |
| 153 | const writer = bw.writer(); |
| 154 | |
| 152 | 155 | std.debug.getStderrMutex().lock(); |
| 153 | 156 | defer std.debug.getStderrMutex().unlock(); |
| 154 | | nosuspend stderr.print(level_txt ++ prefix2 ++ format ++ "\n", args) catch return; |
| 157 | nosuspend { |
| 158 | writer.print(level_txt ++ prefix2 ++ format ++ "\n", args) catch return; |
| 159 | bw.flush() catch return; |
| 160 | } |
| 155 | 161 | } |
| 156 | 162 | |
| 157 | 163 | /// Returns a scoped logging namespace that logs all messages using the scope |