]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix email logger typings
authorChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:49:10 +0000 (14:49 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 12:55:02 +0000 (14:55 +0200)
server/helpers/logger.ts
server/lib/emailer.ts

index 4bd00e50345abb597bb94d778d14711071e0ea29..81b0dfaaae83b6897ff40e1fb14adc1837ac7d37 100644 (file)
@@ -123,10 +123,9 @@ function buildLogger (labelSuffix?: string) {
 }
 
 function bunyanLogFactory (level: string) {
-  return function () {
+  return function (...params: any[]) {
     let meta = null
-    let args: any[] = []
-    args.concat(arguments)
+    let args = [].concat(params)
 
     if (arguments[0] instanceof Error) {
       meta = arguments[0].toString()
@@ -143,6 +142,7 @@ function bunyanLogFactory (level: string) {
 }
 
 const bunyanLogger = {
+  level: () => { },
   trace: bunyanLogFactory('debug'),
   debug: bunyanLogFactory('debug'),
   info: bunyanLogFactory('info'),
index 6bb61484b2fe072375fa58a48f426d584f516036..60284ea2817c909b63f8038faea752591ca99416 100644 (file)
@@ -222,7 +222,7 @@ class Emailer {
       sendmail: true,
       newline: 'unix',
       path: CONFIG.SMTP.SENDMAIL,
-      logger: bunyanLogger as any
+      logger: bunyanLogger
     })
   }