Skip to content

Commit d128eaa

Browse files
committed
only log to stderr instead lsp logging and zls.log
1 parent 0bd1f8b commit d128eaa

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Fuzzer.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
const std = @import("std");
2+
const builtin = @import("builtin");
3+
24
const utils = @import("utils.zig");
35
const lsp = @import("lsp");
46
const Mode = @import("mode.zig").Mode;
@@ -88,7 +90,7 @@ pub fn create(
8890
const argv: []const []const u8 = if (zls_version.order(zls_cli_revamp_version) == .lt)
8991
&.{ config.zls_path, "--enable-debug-log" }
9092
else
91-
&.{ config.zls_path, "--log-level", "debug" };
93+
&.{ config.zls_path, "--log-file", if (builtin.target.os.tag == .windows) "nul" else "/dev/null", "--disable-lsp-logs" };
9294

9395
var zls_process = std.process.Child.init(argv, allocator);
9496
zls_process.env_map = &env_map;

src/Reducer.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const std = @import("std");
2+
const builtin = @import("builtin");
23

34
const utils = @import("utils.zig");
45
const Fuzzer = @import("Fuzzer.zig");
@@ -62,7 +63,7 @@ fn createNewProcessAndInitialize(reducer: *Reducer) !void {
6263
const argv: []const []const u8 = if (zls_version.order(zls_cli_revamp_version) == .lt)
6364
&.{ reducer.config.zls_path, "--enable-debug-log" }
6465
else
65-
&.{ reducer.config.zls_path, "--log-level", "debug" };
66+
&.{ reducer.config.zls_path, "--log-file", if (builtin.target.os.tag == .windows) "nul" else "/dev/null", "--disable-lsp-logs" };
6667

6768
var zls_process = std.process.Child.init(argv, reducer.allocator);
6869
zls_process.env_map = &env_map;

0 commit comments

Comments
 (0)