feat(LSP): add some logging of LSP start/stop

This commit is contained in:
CJ van den Berg 2024-07-08 22:41:34 +02:00
parent f60ccd7c37
commit f9bbc7f582
2 changed files with 32 additions and 0 deletions

View file

@ -3,6 +3,7 @@ const tp = @import("thespian");
const cbor = @import("cbor");
const root = @import("root");
const tracy = @import("tracy");
const log = @import("log");
a: std.mem.Allocator,
pid: tp.pid,
@ -233,6 +234,8 @@ const Process = struct {
}
fn handle_terminated(self: *Process, err: []const u8, code: u32) tp.result {
const logger = log.logger("LSP");
logger.print("terminated: {s} {d}", .{ err, code });
self.write_log("### subprocess terminated {s} {d} ###\n", .{ err, code });
try self.parent.send(.{ sp_tag, self.tag, "done" });
return tp.exit_normal();