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-human
Advanced tools
Turn your [Caterpillar](https://github.com/bevry/caterpillar) logger stream into a beautiful readable format with colors and optional debug information
Turn your Caterpillar logger stream into a beautiful readable format with colors and optional debug information
require('caterpillar-human')
npm install --save caterpillar-human
require('caterpillar-human')
npm install --save caterpillar-human
//wzrd.in/bundle/caterpillar-human@2.1.2
require('caterpillar-human')
ender add caterpillar-human
// Import
var logger = require('caterpillar').createLogger();
var human = require('caterpillar-human').createHuman();
// Pipe logger output to our human interface, then our human interface output to stdout
logger.pipe(human).pipe(process.stdout);
// Log
logger.log('warn', 'this is the first log entry');
// warn: this is the first log entry
logger.log('info', 'this is the second log entry');
// info: this is the second log entry
// Wait
setTimeout(function(){
// Set debug mode
logger.setConfig({level:7});
// Log
logger.log('warn', 'this is the first log entry');
// warn: this is the first log entry
// → [2013-04-25 20:37:22.692] [/Users/balupton/Projects/caterpillar-human/example.js:20] [null._onTimeout]
logger.log('info', 'this is the second log entry');
// info: this is the second log entry
// → [2013-04-25 20:37:22.693] [/Users/balupton/Projects/caterpillar-human/example.js:22] [null._onTimeout]
},0);
new (require('caterpillar-human').Human)(config)
Methods
constructor(config?)
create our new human 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 entryConfiguration
level
number, defaults to null
, when set to 7
(debug level) we will debug information with the log entries
color
boolean, defaults to true
, set to false
to turn off colors
colors
objects of the level to color mapping, defaults to:
{
0: 'red',
1: 'red',
2: 'red',
3: 'red',
4: 'yellow',
5: 'yellow',
6: 'green',
7: 'green'
}
Events
config(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
Turn your [Caterpillar](https://github.com/bevry/caterpillar) logger stream into a beautiful readable format with colors and optional debug information
The npm package caterpillar-human receives a total of 43 weekly downloads. As such, caterpillar-human popularity was classified as not popular.
We found that caterpillar-human 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.