diff options
| author | 2021-12-31 20:46:22 +0200 | |
|---|---|---|
| committer | 2021-12-31 20:46:22 +0200 | |
| commit | 7c9d7a5d6df40542574ba392c08bac8462c07927 (patch) | |
| tree | 8833e42e4deba3cfa5b39f1fcbc887efb53233c2 /src/main.zig | |
| parent | Add `C-x b` as a buffer switching shortcut (diff) | |
| download | es-7c9d7a5d6df40542574ba392c08bac8462c07927.tar.gz es-7c9d7a5d6df40542574ba392c08bac8462c07927.tar.xz es-7c9d7a5d6df40542574ba392c08bac8462c07927.zip | |
Some changes
Diffstat (limited to '')
| -rw-r--r-- | src/main.zig | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index 89c72f0..7a4aaa4 100644 --- a/src/main.zig +++ b/src/main.zig | |||
| @@ -18,12 +18,10 @@ pub fn log( | |||
| 18 | 18 | ||
| 19 | const writer = file.writer(); | 19 | const writer = file.writer(); |
| 20 | 20 | ||
| 21 | const prefix = switch (scope) { | 21 | nosuspend writer.print( |
| 22 | .default => "[" ++ level.asText() ++ "] ", | 22 | "[" ++ @tagName(scope) ++ ":" ++ level.asText() ++ "] " ++ format ++ "\n", |
| 23 | else => "[" ++ @tagName(scope) ++ ":" ++ level.asText() ++ "] ", | 23 | args, |
| 24 | }; | 24 | ) catch return; |
| 25 | |||
| 26 | nosuspend writer.print(prefix ++ format ++ "\n", args) catch return; | ||
| 27 | } | 25 | } |
| 28 | 26 | ||
| 29 | pub fn main() !void { | 27 | pub fn main() !void { |