Skip to content

Commit

Permalink
aio: fix log scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Jun 28, 2024
1 parent 8b027ea commit 0480792
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/aio/Fallback.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/aio/IoUring.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/aio/linux.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0480792

Please sign in to comment.