1
0
Fork 0

Fix email logger typings

This commit is contained in:
Chocobozzz 2021-10-11 14:49:10 +02:00
parent 5ac6449735
commit 40a8c0a4c4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 4 deletions

View 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'),

View File

@ -222,7 +222,7 @@ class Emailer {
sendmail: true,
newline: 'unix',
path: CONFIG.SMTP.SENDMAIL,
logger: bunyanLogger as any
logger: bunyanLogger
})
}