Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(engine): mute intempestive debug logs #110

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/network/p2p.zig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pub const P2P = struct {
// TODO: Implement the P2P network handler
// Initialize the listener
// const address = try net.Address.parseIp4("0.0.0.0", self.config.p2p_port);
// std.debug.panic("{any}", .{address});
// const stream = try net.tcpConnectToAddress(address);

// self.listener = net.Server{
Expand Down
10 changes: 7 additions & 3 deletions src/script/engine.zig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ pub const Engine = struct {
/// Log debug information
fn log(self: *Engine, comptime format: []const u8, args: anytype) void {
_ = self;
std.debug.print(format, args);
_ = format;
_ = args;
// Uncomment this if you need to access the log
// In the future it would be cool to log somewhere else than stderr
// std.debug.print(format, args);
}

/// Execute the script
Expand Down Expand Up @@ -404,12 +408,12 @@ pub const Engine = struct {
}

fn opDisabled(self: *Engine) !void {
std.debug.print("Attempt to execute disabled opcode: 0x{x:0>2}\n", .{self.script.data[self.pc]});
_ = self;
return error.DisabledOpcode;
}

fn opInvalid(self: *Engine) !void {
std.debug.print("Attempt to execute invalid opcode: 0x{x:0>2}\n", .{self.script.data[self.pc]});
_ = self;
return error.UnknownOpcode;
}

Expand Down
Loading