Permalink
Browse files

add format3.js example

  • Loading branch information...
1 parent d4e6fbb commit 8dd4968c92333ab1ca054da82ded67e0ecd4fe1f @baryon committed Mar 7, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 example/format3.js
View
@@ -0,0 +1,15 @@
+var tracer = require('tracer')
+
+function test(id){
+ var logger = tracer.colorConsole(
+ {
+ format : "{{timestamp}} " + id + " <{{title}}> {{message}}",
+ dateformat : "HH:MM:ss.L"
+ });
+ logger.log('hello');
+ logger.trace('hello', 'world');
+ logger.debug('hello %s', 'world', 123);
+}
+
+test('ABC');
+test('123');

0 comments on commit 8dd4968

Please sign in to comment.