From cf56fc9551013070882e29d27a921ec62ccb4ae8 Mon Sep 17 00:00:00 2001 From: himself65 Date: Fri, 31 Mar 2023 16:43:52 -0500 Subject: [PATCH] build: improve logs Fixes: https://github.com/toeverything/AFFiNE/issues/1768 --- apps/web/next.config.mjs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index c18f06b6e3..e64616106c 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -155,9 +155,11 @@ const withDebugLocal = debugLocal( const detectFirebaseConfig = () => { if (!process.env.NEXT_PUBLIC_FIREBASE_API_KEY) { - console.warn('NEXT_PUBLIC_FIREBASE_API_KEY not found, please check it'); + console.warn( + 'NEXT_PUBLIC_FIREBASE_API_KEY not found, affine cloud feature will be disabled.' + ); } else { - console.info('NEXT_PUBLIC_FIREBASE_API_KEY found'); + console.info('NEXT_PUBLIC_FIREBASE_API_KEY found.'); } }; detectFirebaseConfig(); @@ -169,7 +171,10 @@ if (process.env.SENTRY_AUTH_TOKEN) { silent: true, }); } else { - console.log('Sentry not enabled, please set SENTRY_AUTH_TOKEN to enable it'); + console.log( + 'SENTRY_AUTH_TOKEN not found, Sentry monitoring feature will be disabled.' + ); + delete config.sentry; } export default config;