From 23d3366a49d238fe2f052bc62c88ca1f8ad4a59e Mon Sep 17 00:00:00 2001 From: Stephen Melnicki Date: Mon, 12 Feb 2024 12:27:30 -0800 Subject: [PATCH] removing log statements --- plugins/pirsch/src/queue.ts | 8 ++------ plugins/pirsch/src/reporter.ts | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/plugins/pirsch/src/queue.ts b/plugins/pirsch/src/queue.ts index 242342d..26201ba 100644 --- a/plugins/pirsch/src/queue.ts +++ b/plugins/pirsch/src/queue.ts @@ -40,14 +40,13 @@ export class Queue { clientId, clientSecret, }); - console.log("client created."); } get length() { return this.items.length; } - enqueue(request: Request, context: FreshContext) { + push(request: Request, context: FreshContext) { this.items.push(createHit(request, context)); if (!this.uploading) { @@ -61,10 +60,7 @@ export class Queue { const item = this.items.shift(); try { - if (this.client) { - await this.client.hit(item!); - console.log("hit sent."); - } + await this.client?.hit(item!); } catch (err) { console.error(err); await delay(UPLOAD_DELAY); diff --git a/plugins/pirsch/src/reporter.ts b/plugins/pirsch/src/reporter.ts index 7aac8d6..1c2b833 100644 --- a/plugins/pirsch/src/reporter.ts +++ b/plugins/pirsch/src/reporter.ts @@ -38,9 +38,6 @@ export function createReporter(options: PirschPluginOptions): Reporter { return; } - console.log( - `${request.method.toUpperCase()} ${request.url} - ${context.remoteAddr.hostname}`, - ); - queue.enqueue(request, context); + queue.push(request, context); }; }