bdux-logger

18.0.0 • Public • Published

Bdux Logger

A Bdux middleware to log actions and state changes.

Build Status Coverage Status Codacy Badge

Installation

To install as an npm package:

npm install --save-dev bdux-logger

Usage

import * as Logger from 'bdux-logger';
import { applyMiddleware } from 'bdux';

Logger.config({
  collapsed: false,
  predicate: () => true
});

applyMiddleware(
  Logger
);

Options

collapsed

  • type: boolean
  • default: false

Sets to truthy to collapse log groups, falsy otherwise.

predicate

  • type: function
  • default: ({ action }) => !action.skipLog

Returns truthy if action should be logged, falsy otherwise.

License

The ISC License

Package Sidebar

Install

npm i bdux-logger

Weekly Downloads

2

Version

18.0.0

License

ISC

Unpacked Size

10.3 kB

Total Files

8

Last publish

Collaborators

  • intai