Permalink
Browse files

v2.0.5. Improvement.

- v2.0.5 October 23, 2013
	- Added `create` API to make life easier when doing one liners
	- Project meta data files are now maintained by
[Projectz](https://github.com/bevry/projectz)
	- Updated dependencies
  • Loading branch information...
1 parent 17ae9bd commit 64e4945ab109c014c980618eedae43da1f9dd2af @balupton balupton committed Oct 23, 2013
Showing with 150 additions and 74 deletions.
  1. +5 −0 History.md
  2. +11 −3 LICENSE.md
  3. +67 −26 README.md
  4. +62 −45 package.json
  5. +5 −0 src/lib/caterpillar.coffee
View
@@ -1,5 +1,10 @@
## History
+- v2.0.5 October 23, 2013
+ - Added `create` API to make life easier when doing one liners
+ - Project meta data files are now maintained by [Projectz](https://github.com/bevry/projectz)
+ - Updated dependencies
+
- v2.0.4 July 23, 2013
- Added `lineOffset` configuration offset to allow you to detect the correct line of the reporting when using wrappers
- Updated dependencies
View
@@ -1,10 +1,18 @@
-(The MIT License)
-Copyright (c) 2012+ Bevry Pty Ltd <us@bevry.me>
-Copyright (c) 2011 Benjamin Lupton <b@lupton.cc>
+<!-- LICENSEFILE/ -->
+# License
+
+Copyright &copy; 2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
+<br/>Copyright &copy; 2011 Benjamin Lupton <b@lupton.cc> (http://balupton.com)
+
+## The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+<!-- /LICENSEFILE -->
+
+
View
@@ -1,24 +1,38 @@
+
+<!-- TITLE/ -->
+
# Caterpillar
-[![Build Status](https://secure.travis-ci.org/bevry/caterpillar.png?branch=master)](http://travis-ci.org/bevry/caterpillar)
-[![NPM version](https://badge.fury.io/js/caterpillar.png)](https://npmjs.org/package/caterpillar)
-[![Flattr this project](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr)
+<!-- /TITLE -->
-Caterpillar is the ultimate logging system for Node.js, based on [transform streams](http://nodejs.org/api/stream.html#stream_class_stream_transform) you can log to it and pipe the output off to different locations, including [some pre-made ones](http://npmjs.org/keyword/caterpillar-transform). Caterpillar also supports log levels according to the [RFC standard](http://www.faqs.org/rfcs/rfc3164.html), as well as line, method, and file fetching for messages. You can even use it in web browsers with the [Browser Transform](https://github.com/bevry/caterpillar-browser).
+<!-- BADGES/ -->
+[![Build Status](http://img.shields.io/travis-ci/bevry/caterpillar.png?branch=master)](http://travis-ci.org/bevry/caterpillar "Check this project's build status on TravisCI")
+[![NPM version](https://badge.fury.io/js/caterpillar.png)](https://npmjs.org/package/caterpillar "View this project on NPM")
+[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")
+[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
+[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
-## Install
+<!-- /BADGES -->
-### Backend
-1. [Install Node.js](http://bevry.me/node/install)
-2. `npm install --save caterpillar`
+Caterpillar is the ultimate logging system for Node.js, based on [transform streams](http://nodejs.org/api/stream.html#stream_class_stream_transform) you can log to it and pipe the output off to different locations, including [some pre-made ones](http://npmjs.org/keyword/caterpillar-transform). Caterpillar also supports log levels according to the [RFC standard](http://www.faqs.org/rfcs/rfc3164.html), as well as line, method, and file fetching for messages. You can even use it in web browsers with the [Browser Transform](https://github.com/bevry/caterpillar-browser).
+
-### Frontend
+<!-- INSTALL/ -->
-1. [See Browserify](http://browserify.org/)
+## Install
+### [Node](http://nodejs.org/), [Browserify](http://browserify.org/)
+- Use: `require('caterpillar')`
+- Install: `npm install --save caterpillar`
+
+### [Ender](http://ender.jit.su/)
+- Use: `require('caterpillar')`
+- Install: `ender add caterpillar`
+
+<!-- /INSTALL -->
## Usage
@@ -28,9 +42,9 @@ Caterpillar is the ultimate logging system for Node.js, based on [transform stre
``` javascript
// Import
var level = process.argv.indexOf('-d') === -1 ? 6 : 7;
-var logger = new (require('caterpillar').Logger)({level:level});
-var filter = new (require('caterpillar-filter').Filter)();
-var human = new (require('caterpillar-human').Human)();
+var logger = require('caterpillar').createLogger({level:level});
+var filter = require('caterpillar-filter').createFilter();
+var human = require('caterpillar-human').createHuman();
// Pipe logger output to filter, then filter output to stdout
logger.pipe(filter).pipe(human).pipe(process.stdout);
@@ -145,26 +159,53 @@ new (require('caterpillar').Logger)(config)
+<!-- HISTORY/ -->
+
## History
-You can discover the history inside the [History.md](https://github.com/bevry/caterpillar/blob/master/History.md#files) file
+[Discover the change history by heading on over to the `History.md` file.](https://github.com/bevry/caterpillar/blob/master/History.md#files)
+<!-- /HISTORY -->
-## License
-Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
-<br/>Copyright &copy; 2012+ [Bevry Pty Ltd](http://bevry.me)
-<br/>Copyright &copy; 2011 [Benjamin Lupton](http://balupton.com)
+<!-- BACKERS/ -->
+
+## Backers
+
+### Maintainers
+These amazing people are maintaining this project:
+
+- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)
+
+### Sponsors
+
+No sponsors yet! Will you be the first?
+
+[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")
+[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
+[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
+
+### Contributors
+
+These amazing people have contributed code to this project:
+
+- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton) - [view contributions](https://github.com/bevry/caterpillar/commits?author=balupton)
+- t-visualappeal (https://github.com/t-visualappeal) - [view contributions](https://github.com/bevry/caterpillar/commits?author=t-visualappeal)
+
+[Become a contributor!](https://github.com/bevry/caterpillar/blob/master/Contributing.md#files)
+
+<!-- /BACKERS -->
+
+
+<!-- LICENSE/ -->
+
+## License
+Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)
-## Thanks
-Uses the following:
+Copyright &copy; 2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
+<br/>Copyright &copy; 2011 Benjamin Lupton <b@lupton.cc> (http://balupton.com)
-- [RFC3164](http://www.faqs.org/rfcs/rfc3164.html) for the level codes and names
+<!-- /LICENSE -->
-Inspired by the following:
-- [Alexander Dorofeev's](https://github.com/akaspin) [AIN](https://github.com/akaspin/ain)
-- [TJ Holowaychuk's](https://github.com/visionmedia) [Log.js](https://github.com/visionmedia/log.js)
-- [Igor Urminček's](https://github.com/igo) [NLogger](https://github.com/igo/nlogger)
-- [SchizoDuckie's](https://github.com/SchizoDuckie) [Node-CLI](https://github.com/SchizoDuckie/Node-CLI/)
View
@@ -1,47 +1,64 @@
{
- "name": "caterpillar",
- "version": "2.0.4",
- "description": "Caterpillar is the ultimate logging system for Node.js, based on transform streams you can log to it and pipe the output off to different locations, including some pre-made ones. Caterpillar also supports log levels according to the RFC standard, as well as line, method, and file fetching for messages. You can even use it in web browsers with caterpillar-browser.",
- "homepage": "https://github.com/bevry/caterpillar",
- "keywords": [
- "caterpillar",
- "console", "log", "logger", "logging", "debug",
- "stream", "transform"
- ],
- "author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
- "maintainers": [
- "Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
- ],
- "contributors": [
- "Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
- ],
- "bugs": {
- "url": "https://github.com/bevry/caterpillar/issues"
- },
- "repository" : {
- "type": "git",
- "url": "http://github.com/bevry/caterpillar.git"
- },
- "engines" : {
- "node": ">=0.8"
- },
- "dependencies": {
- "extendr": "~2.1.0",
- "readable-stream": "~1.0.2"
- },
- "devDependencies": {
- "caterpillar-filter": "2.x",
- "caterpillar-human": "2.x",
- "coffee-script": "~1.6.2",
- "joe": "~1.2.0",
- "joe-reporter-console": "~1.2.1",
- "chai": "~1.7.2"
- },
- "directories": {
- "lib": "./out/lib"
- },
- "scripts": {
- "test": "node ./out/test/caterpillar-test.js"
- },
- "main": "./out/lib/caterpillar.js"
+ "title": "Caterpillar",
+ "name": "caterpillar",
+ "version": "2.0.5",
+ "description": "Caterpillar is the ultimate logging system for Node.js, based on transform streams you can log to it and pipe the output off to different locations, including some pre-made ones. Caterpillar also supports log levels according to the RFC standard, as well as line, method, and file fetching for messages. You can even use it in web browsers with caterpillar-browser.",
+ "homepage": "https://github.com/bevry/caterpillar",
+ "keywords": [
+ "caterpillar",
+ "console",
+ "log",
+ "logger",
+ "logging",
+ "debug",
+ "stream",
+ "transform"
+ ],
+ "author": "2012+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me), 2011 Benjamin Lupton <b@lupton.cc> (http://balupton.com)",
+ "maintainers": [
+ "Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
+ ],
+ "contributors": [
+ "Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
+ "t-visualappeal (https://github.com/t-visualappeal)"
+ ],
+ "bugs": {
+ "url": "https://github.com/bevry/caterpillar/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/bevry/caterpillar.git"
+ },
+ "engines": {
+ "node": ">=0.8"
+ },
+ "dependencies": {
+ "extendr": "~2.1.0",
+ "readable-stream": "~1.1.9"
+ },
+ "devDependencies": {
+ "caterpillar-filter": "2.x",
+ "caterpillar-human": "2.x",
+ "coffee-script": "~1.6.2",
+ "joe": "~1.3.0",
+ "joe-reporter-console": "~1.2.1",
+ "chai": "~1.8.1"
+ },
+ "directories": {
+ "lib": "./out/lib"
+ },
+ "scripts": {
+ "test": "node ./out/test/caterpillar-test.js"
+ },
+ "main": "./out/lib/caterpillar.js",
+ "license": {
+ "type": "MIT"
+ },
+ "badges": {
+ "travis": true,
+ "npm": true,
+ "gittip": "bevry",
+ "flattr": "344188/balupton-on-Flattr",
+ "paypal": "QB8GQPZAH84N6"
+ }
}
@@ -164,6 +164,11 @@ class Logger extends Transform
# Export
module.exports = {
+ # Classes
Transform
Logger
+
+ # Instantiators
+ createTransform: (args...) -> new Transform(args...)
+ createLogger: (args...) -> new Logger(args...)
}

0 comments on commit 64e4945

Please sign in to comment.