ngrx-store-logger
Advanced logging for @ngrx/store applications, inspired by redux-logger.
Dependencies
ngrx-store-logger
depends on @ngrx/store and Angular 2.
Usage
npm install ngrx-store-logger --save
- Configure your ngrx store as normal using
provideStore
. - Using the provided
loggerMiddleware
function, specify option overrides if applicable.
import {bootstrap} from 'angular2/platform/browser';
import {TodoApp} from './todo-app';
import {provideStore} from "@ngrx/store";
import {loggerMiddleware} from "ngrx-store-logger";
export function main() {
return bootstrap(TodoApp, [
provideStore({todos, visibilityFilter}),
...loggerMiddleware()
])
.catch(err => console.error(err));
}
document.addEventListener('DOMContentLoaded', main);
API
loggerMiddleware(options? = {})
Override appropriate options (more soon)
Arguments
options
(Object{}): Loggers options to override