winston-aws-cloudwatch
A Winston transport for
Amazon CloudWatch.
Usage
var CloudWatchTransport = require('winston-aws-cloudwatch')
winston.add(CloudWatchTransport, {
logGroupName: '...',
logStreamName: '...',
awsConfig: {
accessKeyId: '...',
secretAccessKey: '...',
region: '...'
},
formatLogItem: function (item) {
return item.level + ': ' + item.message + ' ' + JSON.stringify(item.meta)
}
})
But Why?
As you may have noticed, there is also
winston-cloudwatch, which
predates this module. After making some contributions to that one, I felt like
writing my own version. Feel free to use whichever you like best.
Author
Tim De Pauw
License
MIT