refactor: improve usefullness of trace-level 1

This commit is contained in:
CJ van den Berg 2025-01-26 17:01:33 +01:00
parent a1df51a16c
commit 0f6be55dbd
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
6 changed files with 49 additions and 40 deletions

View file

@ -607,7 +607,7 @@ const Process = struct {
}
fn persist_project(self: *Process, project: *Project) !void {
tp.trace(tp.channel.event, .{ "persist_project", project.name });
tp.trace(tp.channel.debug, .{ "persist_project", project.name });
self.logger.print("saving: {s}", .{project.name});
const file_name = try get_project_state_file_path(self.allocator, project);
defer self.allocator.free(file_name);
@ -619,7 +619,7 @@ const Process = struct {
}
fn restore_project(self: *Process, project: *Project) !void {
tp.trace(tp.channel.event, .{ "restore_project", project.name });
tp.trace(tp.channel.debug, .{ "restore_project", project.name });
const file_name = try get_project_state_file_path(self.allocator, project);
defer self.allocator.free(file_name);
var file = std.fs.openFileAbsolute(file_name, .{ .mode = .read_only }) catch |e| switch (e) {