mirror of https://github.com/Chocobozzz/PeerTube
Fix email logger typings
parent
5ac6449735
commit
40a8c0a4c4
|
@ -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'),
|
||||
|
|
|
@ -222,7 +222,7 @@ class Emailer {
|
|||
sendmail: true,
|
||||
newline: 'unix',
|
||||
path: CONFIG.SMTP.SENDMAIL,
|
||||
logger: bunyanLogger as any
|
||||
logger: bunyanLogger
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue