Skip to content

Commit

Permalink
Upgrade to 0.13 stderr mutex API
Browse files Browse the repository at this point in the history
  • Loading branch information
InKryption committed Jun 10, 2024
1 parent abd8de8 commit 353cee0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/trace/log.zig
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,10 @@ pub const StandardErrLogger = struct {
pub const StdErrSink = struct {
const Self = @This();

pub fn consumeEntries(_: Self, entries: []*StandardEntry) void {
pub fn consumeEntries(_: Self, entries: []const *StandardEntry) void {
const std_err_writer = std.io.getStdErr().writer();
var std_err_mux = std.debug.getStderrMutex();
std_err_mux.lock();
defer std_err_mux.unlock();
std.debug.lockStdErr();
defer std.debug.unlockStdErr();

for (entries) |e| {
logfmt.formatter(e, std_err_writer) catch unreachable;
Expand Down

0 comments on commit 353cee0

Please sign in to comment.