diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:49:10 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 14:55:02 +0200 |
commit | 40a8c0a4c4f654ba720ece6219816ad9c4fb9f5e (patch) | |
tree | 700f5951f714acd1b6879b3b5bb736ff5b09b680 /server | |
parent | 5ac64497351d92077b03c13b840933161b96ec19 (diff) | |
download | PeerTube-40a8c0a4c4f654ba720ece6219816ad9c4fb9f5e.tar.gz PeerTube-40a8c0a4c4f654ba720ece6219816ad9c4fb9f5e.tar.zst PeerTube-40a8c0a4c4f654ba720ece6219816ad9c4fb9f5e.zip |
Fix email logger typings
Diffstat (limited to 'server')
-rw-r--r-- | server/helpers/logger.ts | 6 | ||||
-rw-r--r-- | server/lib/emailer.ts | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index 4bd00e503..81b0dfaaa 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts | |||
@@ -123,10 +123,9 @@ function buildLogger (labelSuffix?: string) { | |||
123 | } | 123 | } |
124 | 124 | ||
125 | function bunyanLogFactory (level: string) { | 125 | function bunyanLogFactory (level: string) { |
126 | return function () { | 126 | return function (...params: any[]) { |
127 | let meta = null | 127 | let meta = null |
128 | let args: any[] = [] | 128 | let args = [].concat(params) |
129 | args.concat(arguments) | ||
130 | 129 | ||
131 | if (arguments[0] instanceof Error) { | 130 | if (arguments[0] instanceof Error) { |
132 | meta = arguments[0].toString() | 131 | meta = arguments[0].toString() |
@@ -143,6 +142,7 @@ function bunyanLogFactory (level: string) { | |||
143 | } | 142 | } |
144 | 143 | ||
145 | const bunyanLogger = { | 144 | const bunyanLogger = { |
145 | level: () => { }, | ||
146 | trace: bunyanLogFactory('debug'), | 146 | trace: bunyanLogFactory('debug'), |
147 | debug: bunyanLogFactory('debug'), | 147 | debug: bunyanLogFactory('debug'), |
148 | info: bunyanLogFactory('info'), | 148 | info: bunyanLogFactory('info'), |
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts index 6bb61484b..60284ea28 100644 --- a/server/lib/emailer.ts +++ b/server/lib/emailer.ts | |||
@@ -222,7 +222,7 @@ class Emailer { | |||
222 | sendmail: true, | 222 | sendmail: true, |
223 | newline: 'unix', | 223 | newline: 'unix', |
224 | path: CONFIG.SMTP.SENDMAIL, | 224 | path: CONFIG.SMTP.SENDMAIL, |
225 | logger: bunyanLogger as any | 225 | logger: bunyanLogger |
226 | }) | 226 | }) |
227 | } | 227 | } |
228 | 228 | ||