Skip to content

elastic-store/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A logger for elastic-store.

Installation

$ npm install --save elastic-store-logger

Usage

It can be attached in two different ways.

While creating a store

import {Store} from "elastic-store";
import {logger} from "elastic-store-logger";

let actions = { ... };

let aStore = Store(actions, [logger]);

After creating a store

import {Store} from "elastic-store";
import {logger} from "elastic-store-logger";

let actions = {
	todos: {
		add () { ... },
		remove () { ... }
	},
	notification: { ... }
};

let aStore = Store(actions);

// will log changes made by actions at 'todos' node
aStore.attach("todos", logger);

// OR

// will log changes caused by action at 'todos.add'
aStore.attach("todos.add", logger);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published