Closed tc closed 2 years ago
The README says to use
const AWS = require('aws-sdk'); winston.add(new WinstonCloudWatch({ cloudWatchLogs: new AWS.CloudWatchLogs(), logGroupName: 'testing', logStreamName: 'first' }));
"@aws-sdk/client-cloudwatch-logs" doesn't provide a AWS.CloudWatchLogs()
AWS.CloudWatchLogs()
I tried
new WinstonCloudWatch({ cloudWatchLogs: new CloudWatchLogsClient(), logGroupName: 'web-app', logStreamName: `${process.env.NODE_ENV}`, retentionInDays: 5 })
But get error: uncaughtException aws.describeLogStreams is not a function aws.describeLogStreams is not a function
error: uncaughtException aws.describeLogStreams is not a function aws.describeLogStreams is not a function
i see! use CloudWatchLogs not CloudWatchLogsClient
CloudWatchLogs
CloudWatchLogsClient
The README says to use
"@aws-sdk/client-cloudwatch-logs" doesn't provide a
AWS.CloudWatchLogs()
I tried
But get
error: uncaughtException aws.describeLogStreams is not a function aws.describeLogStreams is not a function