Skip to content

How to pass winston.format.json() as a formatter? #134

Open
@omarryhan

Description

@omarryhan

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(),
        }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions