when logging this way:
const log = logger('context')
log.debug('bla', { di: 'da' })
the arguments do not end up anywhere in the write function:
...
browser: {
write: (logObj, ...logParams) => {
const { level, msg, time } = logObj as Record<string, string>
const timeFormatted = new Date(time).toISOString()
const levelColor = levelColors[level as keyof typeof levelColors]
console.log(`[${timeFormatted}] ${levelColor}${level} ${color.cyan} ${msg} ${color.white}`, ...logParams)
},
formatters: {
level: label => {
return {
level: label,
}
},
},
},
...
arguments always has length 1. Neither logObj contains them, and logParams is always undefined.