Skip to content

Commit

Permalink
resue levels
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Apr 7, 2021
1 parent 14ca1c2 commit 9ac3132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/levels.js
Expand Up @@ -188,6 +188,7 @@ module.exports = {
setLevel,
isLevelEnabled,
mappings,
levels,
assertNoLevelCollisions,
assertDefaultLevelFound
}
12 changes: 3 additions & 9 deletions lib/multistream.js
@@ -1,16 +1,10 @@
'use strict'

const metadata = Symbol.for('pino.metadata')
const { levels } = require('./levels')

const defaultLevels = {
silent: Infinity,
fatal: 60,
error: 50,
warn: 40,
info: 30,
debug: 20,
trace: 10
}
const defaultLevels = Object.create(levels)
defaultLevels.silent = Infinity

function multistream (streamsArray, opts) {
let counter = 0
Expand Down

0 comments on commit 9ac3132

Please sign in to comment.