From d1796d8276fd64059ae09d071eb729e641dc9d19 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Thu, 23 Apr 2020 10:07:38 -0500 Subject: [PATCH] Update to match log style for new env loading --- packages/next/lib/load-env-config.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/next/lib/load-env-config.ts b/packages/next/lib/load-env-config.ts index 9400ef7d07e65..74ac40e30d24e 100644 --- a/packages/next/lib/load-env-config.ts +++ b/packages/next/lib/load-env-config.ts @@ -1,6 +1,6 @@ import fs from 'fs' import path from 'path' -import chalk from 'next/dist/compiled/chalk' +import * as log from '../build/output/log' import findUp from 'next/dist/compiled/find-up' import dotenvExpand from 'next/dist/compiled/dotenv-expand' import dotenv, { DotenvConfigOutput } from 'next/dist/compiled/dotenv' @@ -84,16 +84,13 @@ export function loadEnvConfig(dir: string, dev?: boolean): Env | false { result = dotenvExpand(result) if (result.parsed) { - console.log(`> ${chalk.cyan.bold('Info:')} Loaded env from ${envFile}`) + log.info(`Loaded env from ${envFile}`) } Object.assign(combinedEnv, result.parsed) } catch (err) { if (err.code !== 'ENOENT') { - console.error( - `> ${chalk.cyan.bold('Error: ')} Failed to load env from ${envFile}`, - err - ) + log.error(`Failed to load env from ${envFile}`, err) } } }