Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cca-io/rescript-logger

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cca-io/rescript-logger

Simple logger library for ReScript apps

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

rescript-logger

Simple logger library for ReScript apps.

Design Goals

  1. Do not require a PPX, but still provide a way to include the module name in the log output.
  2. Pluggable logger implementation so that code shared between e.g. React and React Native can use a platform-specific implementation.

Installation

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

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

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

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

Usage

Example:

module Log = unpack(ResLogger.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:

ResLogger.setLoggerImpl(module(MyNativeLoggerImpl))

Keywords

FAQs

Package last updated on 27 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc