baobab-logger
v0.0.6
Published
Logger for Baobab
Downloads
48
Readme
Logger for Baobab
Logger for Baobab inspired by redux-logger.
Install
$ npm install --save baobab-logger
Usage
import Baobab from 'baobab';
import logger from 'baobab-logger';
const tree = new Baobab({
palette: {
colors: ['yellow', 'purple'],
name: 'Glorious colors'
}
});
logger(tree, { collapsed: true });
logger(tree.select('palette'));
Configuration
logger(cursor[, options])
Options
collapsed (Boolean)
Output informations grouped or not.
Default: false
logger (Object)
console
implementation API or custom wrapped library for output.
Default: window.console
level (String)
Log level type: log
, info
, warn
, error
.
Default: log
License
Released under the MIT license.
Credits & Notes
This logger is largely based on redux-logger licensed under the MIT license.