Skip to content

Commit

Permalink
fix: remove response from the log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-tkachenko committed Dec 12, 2023
1 parent 0108773 commit 4b331db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/handlers/HttpProxyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class HttpProxyHandler {
method,
target,
path: url,
response,
responseStatusCode: response.statusCode,
});

if (isKeepAliveRequest) {
Expand Down Expand Up @@ -133,7 +133,7 @@ export class HttpProxyHandler {
method,
target,
path: url,
response,
responseStatusCode: response.statusCode,
});
resolve();
});
Expand Down
6 changes: 3 additions & 3 deletions test/helpers/TestProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ export class TestProxy {
http2ErrorHandler: this.params.customHttp2ErrorHandler ? this.params.customHttp2ErrorHandler : (this.params.customHttp2ErrorHandler !== false ? this.errorHandler.bind(this) : null),
log: {
debug: (context, msg, params) => {
console.log(`[${new Date().toISOString()}] [DEBUG]`, msg, params);
console.log(`[${new Date().toISOString()}] [DEBUG]`, msg, JSON.stringify(params, null, 2));
},
info: (context, msg, params) => {
console.log(`[${new Date().toISOString()}] [INFO]`, msg, params);
console.log(`[${new Date().toISOString()}] [INFO]`, msg, JSON.stringify(params, null, 2));
},
error: (context, msg, error, params) => {
console.log(`[${new Date().toISOString()}] [INFO]`, msg, params, error);
console.log(`[${new Date().toISOString()}] [INFO]`, msg, JSON.stringify(params, null, 2), error);
},
},
proxyRequestHeaders: {
Expand Down

0 comments on commit 4b331db

Please sign in to comment.