How to pass `winston.format.json()` as a formatter?
Opened this issue · 1 comments
omarryhan commented
This will cause a TS error:
new WinstonCloudWatch({
level: 'info',
logGroupName: 'Name',
logStreamName: 'Main',
awsAccessKeyId: process.env.AWS_ACCESS_KEY_ID as string,
awsSecretKey: process.env.AWS_SECRET_KEY as string,
awsRegion: 'eu-central-1',
messageFormatter: winston.format.json(),
}),
I expected it to work like the in the stock transports of Winston e.g.
new winston.transports.Console({
level: 'debug',
format: winston.format.json(),
}),
lazywithclass commented
I am working on a new version of this module that will follow Winston's transports defaults.
Let's come back to this after that PR is closed.