Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
caterpillar-filter
Advanced tools
Filter out undesired log levels from your [Caterpillar](https://github.com/bevry/caterpillar) logger stream
Filter out undesired log levels from your Caterpillar logger stream
require('caterpillar-filter')
npm install --save caterpillar-filter
require('caterpillar-filter')
ender add caterpillar-filter
// Import
var logger = require('caterpillar').createLogger();
var filter = require('caterpillar-filter').createFilter({level:6}); // omit log level entries above 6
// Pipe logger output to filter, then filter output to stdout
logger.pipe(filter).pipe(process.stdout);
// Log
logger.log('info', 'this is the first log entry'); // info is level 6
logger.log('debug', 'this is the second log entry'); // debug is level 7, this will be omitted by our filter
logger.log('info', 'this is the third log entry'); // info is level 6
// Outputs
// {"args":["this is the first log entry"],"date":"2013-04-25T08:48:38.941Z","levelCode":6,"levelName":"info","line":"9","method":"Object.<anonymous>","file":"/Users/balupton/Projects/caterpillar-filter/example.js"}
// {"args":["this is the third log entry"],"date":"2013-04-25T08:48:38.948Z","levelCode":6,"levelName":"info","line":"11","method":"Object.<anonymous>","file":"/Users/balupton/Projects/caterpillar-filter/example.js"}
new (require('caterpillar-filter').Filter)(config)
constructor(config?)
create our new filter instance with the config, config is optionalpipe(child)
pipe our stream to the child, also sync our config to itsetConfig(config)
set the configuration and emit the config
eventgetConfig()
get the configurationformat(entry)
format the caterpillar logger entrylevel
number, defaults to 6
, anything higher will be omittedconfig(config)
emitted once our configuration has updatedDiscover the change history by heading on over to the History.md
file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Licensed under the incredibly permissive MIT license
Copyright © 2012+ Bevry Pty Ltd us@bevry.me (http://bevry.me)
Copyright © 2011 Benjamin Lupton b@lupton.cc (http://balupton.com)
FAQs
Filter out undesired log levels from your Caterpillar logger stream
The npm package caterpillar-filter receives a total of 32 weekly downloads. As such, caterpillar-filter popularity was classified as not popular.
We found that caterpillar-filter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.