also looking at this
fix(log): keep the terminal's colour, and let logging be turned off
#81
4 files
+126
-16
| @@ -91,6 +91,10 @@ pub const LogBridge = struct { | ||
| 91 | 91 | .Warning => host_log.log(.Warning, "[page] {s}", .{message}), |
| 92 | 92 | .Error => host_log.log(.Error, "[page] {s}", .{message}), |
| 93 | 93 | .Fatal => host_log.log(.Fatal, "[page] {s}", .{message}), |
| 94 | // `levelFor` never returns this — a page cannot ask to be silenced, | |
| 95 | // only the host can — but the switch stays exhaustive so adding a | |
| 96 | // level is a compile error rather than a dropped record. | |
| 97 | .Off => {}, | |
| 94 | 98 | } |
| 95 | 99 | |
| 96 | 100 | bridge_error.sendResultToJS(self.allocator, "log", "{\"ok\":true}"); |