0
42%
MIT
Winston Cloudwatch Transport for ReasonML

npm

BsWinstonCloudwatch

Adapter of winston-cloudwatch winston transport plugin for ReasonML. Used with BsWinston.

Install

npm install bs-winston-cloudwatch

And to bsconfig.json: "bs-dependencies": [..., "bs-winston-cloudwatch", ...]

bs-winston must naturally be installed also.

Examples

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_(() => { ... });