Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Add branch name to Slack log messages (#3713)

Kiran Ka7f402e2d799
diff --git a/packages/utils/src/functions/log.ts b/packages/utils/src/functions/log.ts
index c6f776cdb3..c6bbb85ea7 100644
--- a/packages/utils/src/functions/log.ts
+++ b/packages/utils/src/functions/log.ts
@@ -18,6 +18,11 @@ export const log = async ({
/* Log a message to the console */
console.log(message);
+ if (process.env.VERCEL_ENV !== "production") {
+ console.log("Skipping log to Dub Slack in non-production environment.");
+ return;
+ }
+
const HOOK = logTypeToEnv[type];
if (!HOOK) return;
try {