@cca-io/re-logger

1.2.0 • Public • Published

re-logger

Simple logger library for Reason/BuckleScript apps.

Installation

# yarn
yarn add @cca-io/re-logger

# or npm
npm install @cca-io/re-logger

Then add re-logger to the dependencies in your bsconfig.json, e.g.:

{
  "name": "my-app",
  ...
  "bs-dependencies": ["reason-react", "@cca-io/re-logger"],
  ...
}

Usage

Example:

module Log = (val ReLogger.make(__MODULE__));

Log.info("Starting");

/* ... */

Log.error2("Startup error", error);

The actual logger implementation is pluggable, so it can be swapped out e.g. for usage with React Native:

ReLogger.setLoggerImpl((module MyNativeLoggerImpl));

Package Sidebar

Install

npm i @cca-io/re-logger

Weekly Downloads

9

Version

1.2.0

License

MIT

Unpacked Size

9.44 kB

Total Files

9

Last publish

Collaborators

  • fham_
  • cknittel
  • hendriksp