0.1.0 • Published 9 years ago
seneca-log-filter v0.1.0

A Seneca.js Log Filter Module
seneca-log-filter
- Sponsor: nearForm
Examples
var LogFilter = require('seneca-log-filter')
var filter = LogFilter({'omit-metadata': true, level: 'info' })
var obj = {level: 'info', foo: 'test', bar: 'test' }
var filteredObj = filter(obj)
// filteredObj is equal to {foo: 'test', bar: 'test' }API
LogFilter(config)
configis an object which can take several properties which change the behaviour of the filter which are listed below.levela required property which states the log level to filter outomit-metadataa value which can be true or false, if true this omits the properties with the namesseneca,levelandwhenwhen filtering an objectomitan array of strings of names of properties to omit when filtering an object
Returns
A function which can be called on an object to filter properties out of it.
Test
npm testContributing
This module follows the general Senecajs org contribution guidelines, and encourages open participation. If you feel you can help in any way, or discover any Issues, feel free to create an issue or create a pull request!
If you wish to read more on our guidelines, feel free to
- Checkout the concise contribution file
- Checkout our much more indepth contributing guidelines
License
Copyright (c) 2016, David Gonzalez. Licensed under MIT.