I use electron-log 5.1.7. I inspected format page on Github docs but can't wrap my head around the implementation of it.
This example gives ts(2322) error on my end Type '({ message }: { message: any; }) => string' is not assignable to type 'Format'. Type '({ message }: { message: any; }) => string' is not assignable to type '({ message: LogMessage }: { message: any; }) => any[]'. Type 'string' is not assignable to type 'any[]'.ts(2322)
Hi,
I use electron-log 5.1.7. I inspected format page on Github docs but can't wrap my head around the implementation of it.
This example gives ts(2322) error on my end
Type '({ message }: { message: any; }) => string' is not assignable to type 'Format'. Type '({ message }: { message: any; }) => string' is not assignable to type '({ message: LogMessage }: { message: any; }) => any[]'. Type 'string' is not assignable to type 'any[]'.ts(2322)
If I ignore with // @ts-ignore I get exception from electron-log itself.
Unhandled electron-log error TypeError: data.reduce is not a function
Is there any explicit documentation on how to format the log message, for an example change {text} formatting?