Skip to content

Commit

Permalink
normalize only default levels
Browse files Browse the repository at this point in the history
  • Loading branch information
balaji-atoa committed Aug 22, 2024
1 parent 99263a1 commit 39af3f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pino.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function pino (...args) {
const instance = {}
const { opts, stream } = normalize(instance, caller(), ...args)

if (opts?.level && (opts?.customLevels && opts?.customLevels[opts?.level] === undefined) && typeof opts.level === 'string') opts.level = opts.level.toLowerCase()
if (opts.level && typeof opts.level === 'string' && DEFAULT_LEVELS[opts.level.toLowerCase()] !== undefined) opts.level = opts.level.toLowerCase()

const {
redact,
Expand Down

0 comments on commit 39af3f7

Please sign in to comment.