https://github.com/caiogondim/redux-logdown.js
Redux logging middleware
https://github.com/caiogondim/redux-logdown.js
javascript logdown redux
Last synced: 2 months ago
JSON representation
Redux logging middleware
- Host: GitHub
- URL: https://github.com/caiogondim/redux-logdown.js
- Owner: caiogondim
- License: mit
- Created: 2017-03-29T20:29:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-08T16:13:28.000Z (over 7 years ago)
- Last Synced: 2025-03-24T21:51:09.461Z (3 months ago)
- Topics: javascript, logdown, redux
- Language: JavaScript
- Homepage: https://npm.im/redux-logdown
- Size: 201 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redux-logdown
`redux-logdown` is a tiny logger library for [Redux](https://redux.js.org/) written with
[logdown](https://github.com/caiogondim/logdown.js) that supports `localStorage.debug` for
enabling/disabling store logging.## Installation
```bash
$ npm install --save redux-logdown
```## Preview
## Usage
```js
const redux = require('redux')
const reduxLogdown = require('redux-logdown')// ...
const middleware = reduxLogdown('loremStore', { diff: true })
const store = redux.createStore(
reducer,
undefined,
redux.applyMiddleware(middleware)
)
```### Enabling/disabling
Same rules for enabling/disabling as [logdown.js](https://github.com/caiogondim/logdown.js#enablingdisabling-instances).
### Options
#### `diff`
- Default: `false`Enable/disable logging of previous and current state after each action.
## FAQ
### Why not using `redux-logger`?
`redux-logger` don't support `localStorage.debug` out of the box, which is the standard way to
disble/enable debugging modules in the JavaScript ecosystem. So I decided to create a Redux logger
that supports `localStorage.debug`, just like logdown and debug does.---
[caiogondim.com](https://caiogondim.com) ·
GitHub [@caiogondim](https://github.com/caiogondim) ·
Twitter [@caio_gondim](https://twitter.com/caio_gondim)