From 417ea7b84ddba10ce9d5eb639b8340a2c563af83 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 16 Nov 2023 14:42:34 +0000 Subject: [PATCH] fix log --- apps/proxy/src/routes/proxy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/proxy/src/routes/proxy.ts b/apps/proxy/src/routes/proxy.ts index 9d133e0..99ccba0 100644 --- a/apps/proxy/src/routes/proxy.ts +++ b/apps/proxy/src/routes/proxy.ts @@ -29,6 +29,7 @@ export default class ProxyRoute extends Route { } try { + const before = Date.now(); const response = await node.fetch(url); const data = response.data; @@ -39,7 +40,9 @@ export default class ProxyRoute extends Route { // Log the request console.log( - `[${response.headers["X-Proxy-Node"]}] ${url} - ${response.status}` + `[node: ${response.headers["x-proxy-node"]}] ${url} - ${ + response.status + } (${Date.now() - before}ms)` ); // Return the JSON response