From a6c7d26bd58456a4f6ab67d5ba19be433121eda9 Mon Sep 17 00:00:00 2001 From: Sefinek Date: Thu, 10 Oct 2024 07:20:30 +0200 Subject: [PATCH] process.env.NODE_ENV === 'development' --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8f32518..a554543 100644 --- a/index.js +++ b/index.js @@ -146,7 +146,7 @@ const reportIP = async (event, country, hostname, endpoint, userAgent, cycleErro const minutesAgo = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); const secondsAgo = Math.floor((timeDifference % (1000 * 60)) / 1000); - log('log', `${ip} was ${reason} ${hoursAgo}h ${minutesAgo}m ${secondsAgo}s ago. Skipping...`); + if (process.env.NODE_ENV === 'development') log('log', `${ip} was ${reason} ${hoursAgo}h ${minutesAgo}m ${secondsAgo}s ago. Skipping...`); cycleSkippedCount++; continue; }