From 7c9d7a5d6df40542574ba392c08bac8462c07927 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Fri, 31 Dec 2021 20:46:22 +0200 Subject: Some changes --- src/main.zig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main.zig') 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( const writer = file.writer(); - const prefix = switch (scope) { - .default => "[" ++ level.asText() ++ "] ", - else => "[" ++ @tagName(scope) ++ ":" ++ level.asText() ++ "] ", - }; - - nosuspend writer.print(prefix ++ format ++ "\n", args) catch return; + nosuspend writer.print( + "[" ++ @tagName(scope) ++ ":" ++ level.asText() ++ "] " ++ format ++ "\n", + args, + ) catch return; } pub fn main() !void { -- cgit v1.2.3