Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/flatiron/winston
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvin French-Owen committed Aug 29, 2012
2 parents 142d9fd + 8ecd17c commit 08ae171
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -2,7 +2,6 @@ language: node_js
node_js:
- 0.6
- 0.8
- 0.9

notifications:
email:
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png)](http://travis-ci.org/flatiron/winston)
# winston [![Build Status](https://secure.travis-ci.org/flatiron/winston.png?branch=master)](http://travis-ci.org/flatiron/winston)

A multi-transport async logging library for node.js. <span style="font-size:28px; font-weight:bold;">&quot;CHILL WINSTON! ... I put it in the logs.&quot;</span>

Expand Down
44 changes: 44 additions & 0 deletions examples/custom-levels.js
@@ -0,0 +1,44 @@
/*
* custom-levels.js: Custom logger and color levels in winston
*
* (C) 2012, Nodejitsu Inc.
*
*/

var winston = require('../lib/winston');

//
// Logging levels
//
var config = {
levels: {
silly: 0,
verbose: 1,
info: 2,
data: 3,
warn: 4,
debug: 5,
error: 6
},
colors: {
silly: 'magenta',
verbose: 'cyan',
info: 'green',
data: 'grey',
warn: 'yellow',
debug: 'blue',
error: 'red'
}
};

var logger = module.exports = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
colorize: true
})
],
levels: config.levels,
colors: config.colors
});

logger.data('hello')

0 comments on commit 08ae171

Please sign in to comment.