Browse Source

fix bug with logging to stdout

ameba23 3 years ago
parent
commit
09a65245b0
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      logger.js

+ 1
- 2
logger.js View File

@@ -5,9 +5,8 @@ module.exports = function (storage, opts = {}) {
5 5
   return function (name, suboptions = {}) {
6 6
     if (!process.env.PRODUCTION) return Debug
7 7
     const logger = pino({ name }, pino.destination(storage))
8
-    opts = Object.assign(opts, suboptions)
9 8
     return function (...args) {
10
-      if (opts.stdout) console.log(...args)
9
+      if (opts.stdout || suboptions.stdout) console.log(...args)
11 10
       logger.info(...args)
12 11
     }
13 12
   }