Skip to content

Commit a7f402e

Browse files
devkiransteven-tey
andauthored
Add branch name to Slack log messages (dubinc#3713)
Co-authored-by: Steven Tey <stevensteel97@gmail.com>
1 parent 39d1565 commit a7f402e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/utils/src/functions

packages/utils/src/functions/log.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ export const log = async ({
1818
/* Log a message to the console */
1919
console.log(message);
2020

21+
if (process.env.VERCEL_ENV !== "production") {
22+
console.log("Skipping log to Dub Slack in non-production environment.");
23+
return;
24+
}
25+
2126
const HOOK = logTypeToEnv[type];
2227
if (!HOOK) return;
2328
try {

0 commit comments

Comments
 (0)