diff --git a/src/Config.zig b/src/Config.zig index 5633ce3..55eec53 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -159,7 +159,7 @@ pub fn configChanged(config: *Config, allocator: std.mem.Allocator, builtin_crea // We know this is allocated with `allocator`, we just steal it! config.zig_lib_path = json_env.lib_dir.?; json_env.lib_dir = null; - logger.info("Using zig lib path '{s}'", .{config.zig_lib_path}); + logger.info("Using zig lib path '{?s}'", .{config.zig_lib_path}); } }, else => logger.err("zig env invocation failed", .{}), diff --git a/src/DocumentStore.zig b/src/DocumentStore.zig index 146c570..5f75631 100644 --- a/src/DocumentStore.zig +++ b/src/DocumentStore.zig @@ -255,7 +255,7 @@ fn newDocument(self: *DocumentStore, uri: []const u8, text: [:0]u8) anyerror!*Ha if (build_file.builtin_uri == null) { if (self.config.builtin_path != null) { build_file.builtin_uri = try URI.fromPath(self.allocator, self.config.builtin_path.?); - log.info("builtin config not found, falling back to default: {s}", .{build_file.builtin_uri}); + log.info("builtin config not found, falling back to default: {?s}", .{build_file.builtin_uri}); } } diff --git a/src/Server.zig b/src/Server.zig index ef49fed..8661bce 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -51,7 +51,7 @@ pub fn log(comptime message_level: std.log.Level, comptime scope: @Type(.EnumLit } // After shutdown, pipe output to stderr if (!keep_running) { - std.debug.print("[{s}-{s}] " ++ format ++ "\n", .{ @tagName(message_level), @tagName(scope) } ++ args); + std.debug.print("[{?s}-{?s}] " ++ format ++ "\n", .{ @tagName(message_level), @tagName(scope) } ++ args); return; } @@ -59,7 +59,7 @@ pub fn log(comptime message_level: std.log.Level, comptime scope: @Type(.EnumLit var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); defer arena.deinit(); - var message = std.fmt.allocPrint(arena.allocator(), "[{s}-{s}] " ++ format, .{ @tagName(message_level), @tagName(scope) } ++ args) catch { + var message = std.fmt.allocPrint(arena.allocator(), "[{?s}-{?s}] " ++ format, .{ @tagName(message_level), @tagName(scope) } ++ args) catch { std.debug.print("Failed to allocPrint message.\n", .{}); return; };