Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caterpillar

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caterpillar - npm Package Compare versions

Comparing version 0.1.7 to 1.0.0

docs/caterpillar.html

7

package.json
{
"name": "caterpillar",
"version": "0.1.7",
"version": "1.0.0",
"description": "Caterpillar is an awesome, simple console logger for node.js. It supports grouping of messages, filtering log levels, colors, times, modules, custom formatters and custom transports. It's awesome.",

@@ -46,4 +46,7 @@ "homepage": "https://github.com/balupton/caterpillar.npm",

"dependencies": {
"cli-color": "=0.1.3"
"cli-color": "0.1.x"
},
"devDependencies": {
"docco": "0.3.x"
},
"engines" : {

@@ -50,0 +53,0 @@ "node": ">=0.4.0"

# Caterpillar
Caterpillar is an awesome, simple, intuitive console logger for [node.js](http://nodejs.org/). It supports grouping of messages, filtering log levels, colors, times, modules, custom formatters and custom transports.
Caterpillar is an awesome, simple, intuitive console logger for [Node.js](http://nodejs.org/). It supports grouping of messages, filtering log levels, colors, times, modules, custom formatters and custom transports

@@ -8,44 +8,25 @@

### [examples/console.coffee](https://github.com/balupton/caterpillar.npm/blob/master/examples/console.coffee)
### Running Normally
<img src="https://github.com/balupton/caterpillar.npm/raw/master/media/caterpillar.npm.png"/>
Running the [console example](https://github.com/balupton/caterpillar.npm/blob/master/examples/console.coffee#files) with `coffee examples/console.coffee`
``` coffeescript
# Requires
caterpillar = require "#{__dirname}/../lib/caterpillar.coffee"
<img src="https://github.com/balupton/caterpillar.npm/raw/master/media/caterpillar-normal.png"/>
# Create
logger = new caterpillar.Logger
transports:
level: 7
# Logs
for own name,code of logger.config.levels
logger.log name, "this is #{name} and is level #{code}"
### Running in Debug Mode (log level 7)
# Standard
logger.log ''
logger.log 'this is awesome'
logger.log 'this','is','awesome'
Running the [console example](https://github.com/balupton/caterpillar.npm/blob/master/examples/console.coffee#files) with `coffee examples/console.coffee -d`
# Colors
colors = caterpillar.colors
logger.log ''
logger.log 'this is', colors.magenta.bold.italic.underline('awesome')
When you set the log level to level 7 (debug level), then the `ConsoleFormatter` will also output a debug line, containing the time, file, function and line number of what triggered the log message
# Grouping
logger.config.autoFlush = false
logger.log ''
logger.log 'one'
logger.log 'two'
logger.log 'three'
setTimeout(
-> logger.flush()
3000
)
```
<img src="https://github.com/balupton/caterpillar.npm/raw/master/media/caterpillar-debug.png"/>
# Install
## Using
Please refer to the [console example](https://github.com/balupton/caterpillar.npm/blob/master/examples/console.coffee#files) for usage
## Install
1. [Install Node.js](https://github.com/balupton/node/wiki/Installing-Node.js)

@@ -80,2 +61,2 @@

Licensed under the [MIT License](http://creativecommons.org/licenses/MIT/)
Copyright 2011 [Benjamin Arthur Lupton](http://balupton.com)
<br/>Copyright &copy; 2011-2012 [Benjamin Arthur Lupton](http://balupton.com)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc