From f59757a28e667e21b97c5ca5df63fbcd5e80403c Mon Sep 17 00:00:00 2001 From: didinele Date: Fri, 1 Sep 2023 20:43:36 +0300 Subject: [PATCH] chore: add debug logs to proxy --- services/discord-proxy/src/server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/discord-proxy/src/server.ts b/services/discord-proxy/src/server.ts index 7d1a07f2..9a0d3ae8 100644 --- a/services/discord-proxy/src/server.ts +++ b/services/discord-proxy/src/server.ts @@ -36,6 +36,7 @@ export class ProxyServer { if (method === RequestMethod.Get) { const cached = await this.cache.fetch(fullRoute); + this.logger.debug(cached, 'cache hit'); if (cached !== null) { res.statusCode = 200; res.setHeader('Content-Type', 'application/json'); @@ -63,6 +64,7 @@ export class ProxyServer { } const data = await parseResponse(discordResponse); + this.logger.debug(data, 'response'); res.write(JSON.stringify(data)); await this.cache.update(fullRoute, data);