forked from mirrors/Scribe.js
Update README.md
This commit is contained in:
parent
008a813d5e
commit
863269ced6
1 changed files with 17 additions and 3 deletions
20
README.md
20
README.md
|
@ -78,9 +78,23 @@ console.low("[Tagname]Simple message");
|
||||||
----
|
----
|
||||||
```js
|
```js
|
||||||
// Inside app.js
|
// Inside app.js
|
||||||
app.configure(function () {
|
// If you are trying to use it. Just do the following.
|
||||||
app.use(scribe.express.logger);
|
var scribe = require('./libs/scribe');
|
||||||
}
|
|
||||||
|
scribe.addLogger("log", true /* Save to file? */, true /* Print to console? */, 'green');
|
||||||
|
scribe.addLogger('error', true, true, 'red');
|
||||||
|
scribe.addLogger('warn', true, true, 'yellow');
|
||||||
|
scribe.addLogger('realtime', true, true, 'underline');
|
||||||
|
scribe.addLogger('high', true, true, 'magenta');
|
||||||
|
scribe.addLogger('normal', true, true, 'white');
|
||||||
|
scribe.addLogger('low', true, true, 'grey');
|
||||||
|
scribe.addLogger('info', true, true, 'cyan');
|
||||||
|
|
||||||
|
// Express.js Output
|
||||||
|
app.use(scribe.express.logger(function(req, res){
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
|
||||||
// Enable Web Control Panel
|
// Enable Web Control Panel
|
||||||
app.get('/log', scribe.express.getlog);
|
app.get('/log', scribe.express.getlog);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue