Add missing \n in error message output to stderr
This commit is contained in:
parent
487e22d3ce
commit
addecb3a37
10
src/main.zig
10
src/main.zig
@ -45,7 +45,7 @@ pub fn log(
|
|||||||
defer arena.deinit();
|
defer arena.deinit();
|
||||||
|
|
||||||
var message = std.fmt.allocPrint(&arena.allocator, "[{s}-{s}] " ++ format, .{ @tagName(message_level), @tagName(scope) } ++ args) catch |err| {
|
var message = std.fmt.allocPrint(&arena.allocator, "[{s}-{s}] " ++ format, .{ @tagName(message_level), @tagName(scope) } ++ args) catch |err| {
|
||||||
std.debug.print("Failed to allocPrint message.", .{});
|
std.debug.print("Failed to allocPrint message.\n", .{});
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ pub fn log(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}) catch |err| {
|
}) catch |err| {
|
||||||
std.debug.print("Failed to send show message notification (error: {}).", .{err});
|
std.debug.print("Failed to send show message notification (error: {}).\n", .{err});
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const message_type: types.MessageType = if (message_level == .debug)
|
const message_type: types.MessageType = if (message_level == .debug)
|
||||||
@ -83,7 +83,7 @@ pub fn log(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}) catch |err| {
|
}) catch |err| {
|
||||||
std.debug.print("Failed to send show message notification (error: {}).", .{err});
|
std.debug.print("Failed to send show message notification (error: {}).\n", .{err});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1527,9 +1527,9 @@ pub fn main() anyerror!void {
|
|||||||
defer allocator.free(arg);
|
defer allocator.free(arg);
|
||||||
if (std.mem.eql(u8, arg, "--debug-log")) {
|
if (std.mem.eql(u8, arg, "--debug-log")) {
|
||||||
actual_log_level = .debug;
|
actual_log_level = .debug;
|
||||||
std.debug.print("Enabled debug logging", .{});
|
std.debug.print("Enabled debug logging\n", .{});
|
||||||
} else {
|
} else {
|
||||||
std.debug.print("Unrecognized argument {s}", .{arg});
|
std.debug.print("Unrecognized argument {s}\n", .{arg});
|
||||||
std.os.exit(1);
|
std.os.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user