From c3afd345eeb9e717c38525ae73080e624d0a0980 Mon Sep 17 00:00:00 2001 From: Mikkel Schmidt Date: Thu, 5 Dec 2024 14:35:51 +0100 Subject: [PATCH] CLI: CLI isn't logging to file, log environment vars --- src/cli/logger.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cli/logger.ts b/src/cli/logger.ts index d05870b93..45bce3491 100644 --- a/src/cli/logger.ts +++ b/src/cli/logger.ts @@ -3,6 +3,7 @@ import { serverSchema } from '@/env/schema.mjs'; import { globalPinoOpts } from '@/helpers/logger.js'; import dotenv from 'dotenv'; import { existsSync, readFileSync } from 'fs'; +import { echo } from 'zx'; let logger: pino.Logger | null = null; const envFile = existsSync('./.env.local') ? readFileSync('.env.local') : readFileSync('.env'); @@ -11,6 +12,7 @@ export const getLogger = () => { return logger; } const environment = serverSchema.parse({ NODE_ENV: 'production', ...dotenv.parse(envFile) }); + echo('environment', environment); const transportOption: pino.LoggerOptions['transport'] = process.env.NODE_ENV === 'development' ? {