Socket
Book a DemoInstallSign in
Socket

freactal-logger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freactal-logger

Logger for freactal

0.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Logger for freactal

Table of contents

  • Install
  • Usage
  • Options
  • Recipes
  • To Do
  • License

Install

npm i --save freactal-logger

Usage

In freactal mddleware is defined per state container, so you should create logger for per state container.

import { provideState } from 'freactal';
import createLogger from 'freactal-logger';

const logger = createLogger({
  // ...options
});

provideState({
  middleware: [logger],
});

Options

{
  collapsed, // the log group is collapsed or not.
}

Options description

collapsed (Boolean)

Takes a boolean to inidicate the log group should be collapsed or not.

Default: false

Recipes

Log only in development

import { provideState } from 'freactal';
import createLogger from 'freactal-logger';


const middlewares = [];

if (process.env.NODE_ENV === `development`) {
  const logger = createLogger();
  middlewares.push(logger);
}

provideState({
  middleware: middlewares,
});

To Do

  • Write tests
  • Support more options

Feel free to create PR for any of those tasks!

License

MIT

Keywords

freactal-logger

FAQs

Package last updated on 01 Jul 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.