Skip to content

Commit

Permalink
fixed some words
Browse files Browse the repository at this point in the history
  • Loading branch information
baryon committed Mar 5, 2012
1 parent 074e84b commit 00768a5
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Expand Up @@ -200,6 +200,22 @@ logger.log5('hello %s %d', 'world', 123);


``` ```


the filter support key-value pair, example: [color_console.js](https://github.com/baryon/tracer/blob/master/lib/color_console.js)

```javascript
{
filters : {
//log : colors.black,
trace : colors.magenta,
debug : colors.blue,
info : colors.green,
warn : colors.yellow,
error : [ colors.red, colors.bold ]
}
}
```


### Log File Transport ### Log File Transport
```javascript ```javascript
var fs = require('fs'); var fs = require('fs');
Expand Down Expand Up @@ -280,6 +296,25 @@ console.log('\n\n\npress ctrl-c to exit');
``` ```




### Define your logging helper

the works is like [color_console.js](https://github.com/baryon/tracer/blob/master/lib/color_console.js)

```javascript
var colors = require('colors');
module.exports = function(conf) {
return require('./console')({
filters : {
//log : colors.black,
trace : colors.magenta,
debug : colors.blue,
info : colors.green,
warn : colors.yellow,
error : [ colors.red, colors.bold ]
}
}, conf);
};
```


## History ## History


Expand Down

0 comments on commit 00768a5

Please sign in to comment.