Adapter of winston-cloudwatch winston transport plugin for ReasonML. Used with BsWinston.
npm install bs-winston-cloudwatch
And to bsconfig.json
: "bs-dependencies": [..., "bs-winston-cloudwatch", ...]
bs-winston
must naturally be installed also.
let (cloudwatchTransport, kthxbyeFn) = BsWinstonCloudwatch.Transport.createCloudwatch(
~logGroupName = "xxxx",
~logStreamName = "yyyy",
);
let logger = Builder.create()
-> Builder.addTransport(cloudwatchTransport)
-> Builder.build;
/* ... after logging done, flush and close: */
kthxbye()
|> Js.Promise.then_(() => { ... });