Bläddra i källkod

Make this log message less noisy (#285)

* make this log message less noisy

* build

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
Jayant Krishnamurthy 3 år sedan
förälder
incheckning
71a6ae687e
1 ändrade filer med 4 tillägg och 10 borttagningar
  1. 4 10
      third_party/pyth/price-service/src/ws.ts

+ 4 - 10
third_party/pyth/price-service/src/ws.ts

@@ -82,20 +82,14 @@ export class WebSocketAPI {
       return;
     }
 
+    const clients: Set<WebSocket> = this.priceFeedClients.get(priceInfo.priceFeed.id)!;
     logger.info(
       `Sending ${priceInfo.priceFeed.id} price update to ${
-        this.priceFeedClients.get(priceInfo.priceFeed.id)!.size
-      } clients`
+        clients.size
+      } clients: ${Array.from(clients.values()).map((ws, _idx, _arr) => this.wsId.get(ws))}`
     );
 
-    for (let client of this.priceFeedClients
-      .get(priceInfo.priceFeed.id)!
-      .values()) {
-      logger.info(
-        `Sending ${
-          priceInfo.priceFeed.id
-        } price update to client ${this.wsId.get(client)}`
-      );
+    for (let client of clients.values()) {
       this.promClient?.addWebSocketInteraction("server_update", "ok");
 
       let verbose = this.priceFeedClientsVerbosity