better stdout logging

This commit is contained in:
Emil Lerch 2025-04-08 09:49:00 -07:00
parent b491449295
commit a8f57197a7
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -107,7 +107,11 @@ pub fn main() !u8 {
for (events) |event| { for (events) |event| {
for (config.watchers) |watcher| { for (config.watchers) |watcher| {
if (watcher.matches(event)) { if (watcher.matches(event)) {
try stdout.print("Match found for folder {s}, path {s}, executing command\n\t{s}\n", .{ event.folder, event.path, watcher.command }); try stdout.print(
"Match - Folder: {s} Action: {s} Event type: {s} Path: {s}\n",
.{ event.folder, event.action, event.event_type, event.path },
);
std.log.debug("Executing command \n\t{s}", .{watcher.command});
try lib.executeCommand(allocator, watcher.command, event); try lib.executeCommand(allocator, watcher.command, event);
} }
} }