Skip to content

Commit

Permalink
Log HTTP requests and responses by default when log level is debug or…
Browse files Browse the repository at this point in the history
… verbose
  • Loading branch information
Jarred-Sumner committed Apr 25, 2023
1 parent 6e16bb6 commit 3c4f092
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bun.js/webcore/response.zig
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,9 @@ pub const Fetch = struct {

var headers: ?Headers = null;
var method = Method.GET;
var args = JSC.Node.ArgumentsSlice.from(ctx.bunVM(), arguments);
var script_ctx = globalThis.bunVM();

var args = JSC.Node.ArgumentsSlice.from(script_ctx, arguments);
defer args.deinit();

var url: ZigURL = undefined;
Expand All @@ -954,7 +956,7 @@ pub const Fetch = struct {
};
var disable_timeout = false;
var disable_keepalive = false;
var verbose = false;
var verbose = script_ctx.log.level.atLeast(.debug);
var proxy: ?ZigURL = null;
var follow_redirects = true;
var signal: ?*JSC.WebCore.AbortSignal = null;
Expand Down

0 comments on commit 3c4f092

Please sign in to comment.