Skip to content
Browse files

Update master

  • Loading branch information...
1 parent 11cd8f6 commit 37975aec24116a3df535204d35e35998d0949977 @mixu committed Jun 8, 2012
Showing with 5 additions and 18 deletions.
  1. +5 −18 readme.md
View
23 readme.md
@@ -39,7 +39,7 @@ You can pipe to more than one pipe if you want.
Basic usage:
- var log = require('minilog')();
+ var log = require('minilog')('app');
require('minilog').pipe(process.stdout);
@@ -49,21 +49,13 @@ Basic usage:
.warn('warning')
.error('this is an error message');
-You can namespace logs:
+Output depends on the formatter function. The node_console backend has several built-in inspired by [logme](https://github.com/vesln/logme):
- var log = require('minilog')('worker');
-
- require('minilog').pipe(process.stdout);
-
- log.info('Booting', { foo: 'bar' });
- log.error('FooBar');
- log('Hello', 'World');
+![screenshot](https://github.com/mixu/minilog/raw/master/test/example/screenshot.png)
-Output:
+Have a look at [./test/examples/themes_example.js](https://github.com/mixu/minilog/blob/master/test/example/themes_example.js) - basically, you pass the formatter to .pipe().format().
- worker info Booting {"foo":"bar"}
- worker error FooBar
- worker Hello World
+The withStack formatter can print the module name and current line number by examining the stack trace.
## Formatting / templating
@@ -77,11 +69,6 @@ Each pipe returns a chainable config object. Formatting can be applied to pipes:
+ args.join(' ') + '\n';
});
-The console logger comes with format functions inspired by [logme](https://github.com/vesln/logme).
-The withStack formatter can print the module name and current line number by examining the stack trace.
-
-![screenshot](https://github.com/mixu/minilog/raw/master/test/example/screenshot.png)
-
## Adding filters
Filters can be applied to pipes:

0 comments on commit 37975ae

Please sign in to comment.
Something went wrong with that request. Please try again.