A Bdux middleware to log actions and state changes.
To install as an npm package:
npm install --save-dev bdux-logger
import * as Logger from 'bdux-logger';
import { applyMiddleware } from 'bdux';
Logger.config({
collapsed: false,
predicate: () => true
});
applyMiddleware(
Logger
);
- type:
boolean
- default:
false
Sets to truthy to collapse log groups, falsy otherwise.
- type:
function
- default:
({ action }) => !action.skipLog
Returns truthy if action should be logged, falsy otherwise.