From 04807922b4c0ffd9d9124585a4fd3522678fbf65 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Fri, 28 Jun 2024 18:26:13 +0900 Subject: [PATCH] aio: fix log scopes --- src/aio/Fallback.zig | 2 +- src/aio/IoUring.zig | 2 +- src/aio/linux.zig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aio/Fallback.zig b/src/aio/Fallback.zig index 78cc231..1209561 100644 --- a/src/aio/Fallback.zig +++ b/src/aio/Fallback.zig @@ -7,6 +7,7 @@ const ItemPool = @import("minilib").ItemPool; const FixedArrayList = @import("minilib").FixedArrayList; const DoubleBufferedFixedArrayList = @import("minilib").DoubleBufferedFixedArrayList; const DynamicThreadPool = @import("minilib").DynamicThreadPool; +const log = std.log.scoped(.aio_fallback); // This tries to emulate io_uring functionality. // If something does not match how it works on io_uring on linux, it should be change to match. @@ -402,7 +403,6 @@ fn debug(comptime fmt: []const u8, args: anytype) void { std.debug.print("fallback: " ++ fmt ++ "\n", args); } else { if (comptime !aio.options.debug) return; - const log = std.log.scoped(.fallback); log.debug(fmt, args); } } diff --git a/src/aio/IoUring.zig b/src/aio/IoUring.zig index 493d5b2..ffaa009 100644 --- a/src/aio/IoUring.zig +++ b/src/aio/IoUring.zig @@ -4,7 +4,7 @@ const Operation = @import("ops.zig").Operation; const ItemPool = @import("minilib").ItemPool; const posix = @import("posix.zig"); const linux = @import("posix/linux.zig"); -const log = std.log.scoped(.io_uring); +const log = std.log.scoped(.aio_io_uring); const Supported = struct { var once = std.once(do_once); diff --git a/src/aio/linux.zig b/src/aio/linux.zig index 4fe6335..e49443f 100644 --- a/src/aio/linux.zig +++ b/src/aio/linux.zig @@ -2,7 +2,7 @@ const std = @import("std"); const aio = @import("../aio.zig"); const IoUring = @import("IoUring.zig"); const Fallback = @import("Fallback.zig"); -const log = std.log.scoped(.aio); +const log = std.log.scoped(.aio_linux); pub const IO = switch (aio.options.fallback) { .auto => FallbackSupport, // prefer IoUring, support fallback during runtime