Skip to content

Commit

Permalink
feat: default logLevel to 1 in test environments (unjs#134)
Browse files Browse the repository at this point in the history
close unjs#131
  • Loading branch information
antfu authored and nevilm-lt committed May 2, 2022
1 parent 1615c4b commit 6bc32ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { Consola, BasicReporter, FancyReporter, JSONReporter, WinstonReporter, L

function createConsola () {
// Log level
let level = env.debug ? 4 : 3
let level = env.debug
? LogLevel.Debug
: env.test
? LogLevel.Warn
: LogLevel.Info
if (process.env.CONSOLA_LEVEL) {
level = parseInt(process.env.CONSOLA_LEVEL) || level
}
Expand Down

0 comments on commit 6bc32ce

Please sign in to comment.