Caterpillar
Caterpillar is an awesome, simple console logging framework for Node.js. It supports grouping of messages, filtering log levels, colors, times, modules, custom formatters and custom transports.
Example
# Requires
catepillar = require "#{__dirname}/../lib/caterpillar.coffee"
# Create
logger = new catepillar.Logger
transports:
level: 7
formatter:
module: module
# Logs
for own name,code of logger.config.levels
logger.log name, "this is #{name}"
# Standard
logger.log 'this is awesome'
# Grouping
logger.config.autoFlush = false
logger.log ''
logger.log 'one'
logger.log 'two'
logger.log 'three'
setTimeout(
-> logger.flush()
3000
)
Install
-
Install Node.js
-
Install CoffeeScript
npm -g install coffee-script
-
Install DocPad
npm install caterpillar
Thanks
Uses the following:
Inspired by the following:
License
Licensed under the MIT License
Copyright 2011 Benjamin Arthur Lupton