Permalink
Browse files

updated to 0.4.2

  • Loading branch information...
1 parent 2d83086 commit 4896dc5e8929bd8386b36cdefa0418181ce2fb2d @baryon committed Apr 23, 2012
Showing with 19 additions and 10 deletions.
  1. +1 −0 .npmignore
  2. +4 −0 README.md
  3. +10 −7 example/console.js
  4. +2 −2 lib/color_console.js
  5. +1 −0 lib/console.js
  6. +1 −1 package.json
View
@@ -0,0 +1 @@
+.DS_Store
View
@@ -380,6 +380,10 @@ module.exports = function(conf) {
## History
+### 0.4.2
+
+* fixed: debug color from blue to cyan
+
### 0.4.1
* fixed: default timestamp is ISO UTC format.
View
@@ -7,11 +7,14 @@ logger.info('hello %s %d', 'world', 123, {foo:'bar'});
logger.warn('hello %s %d %j', 'world', 123, {foo:'bar'});
logger.error('hello %s %d %j', 'world', 123, {foo:'bar'}, [1, 2, 3, 4], Object);
+eval("logger.log('hello');");
-//$ node example/console.js
-//2012-03-02T13:42:00.99Z <log> console.js:3 (Object.<anonymous>) hello
-//2012-03-02T13:42:01.02Z <trace> console.js:4 (Object.<anonymous>) hello world
-//2012-03-02T13:42:01.03Z <debug> console.js:5 (Object.<anonymous>) hello world 123
-//2012-03-02T13:42:01.05Z <info> console.js:6 (Object.<anonymous>) hello world 123 { foo: 'bar' }
-//2012-03-02T13:42:01.07Z <warn> console.js:7 (Object.<anonymous>) hello world 123 {"foo":"bar"}
-//2012-03-02T13:42:01.07Z <error> console.js:8 (Object.<anonymous>) hello world 123 {"foo":"bar"} [ 1, 2, 3, 4 ] function Object() { [native code] }
+
+//$ node console.js
+//2012-04-23T01:56:56.296Z <log> console.js:3 (Object.<anonymous>) hello
+//2012-04-23T01:56:56.316Z <trace> console.js:4 (Object.<anonymous>) hello world
+//2012-04-23T01:56:56.318Z <debug> console.js:5 (Object.<anonymous>) hello world 123
+//2012-04-23T01:56:56.320Z <info> console.js:6 (Object.<anonymous>) hello world 123 { foo: 'bar' }
+//2012-04-23T01:56:56.320Z <warn> console.js:7 (Object.<anonymous>) hello world 123 {"foo":"bar"}
+//2012-04-23T01:56:56.321Z <error> console.js:8 (Object.<anonymous>) hello world 123 {"foo":"bar"} [ 1, 2, 3, 4 ] function Object() { [native code] }
+//2012-04-23T01:56:56.323Z <log> console.js:10 (Object.<anonymous> (eval at <anonymous>) hello
@@ -2,9 +2,9 @@ var colors = require('colors');
module.exports = function(conf) {
return require('./console')({
filters : {
- //log : colors.black,
+ log : colors.black,
trace : colors.magenta,
- debug : colors.blue,
+ debug : colors.cyan,
info : colors.green,
warn : colors.yellow,
error : [ colors.red, colors.bold ]
View
@@ -31,6 +31,7 @@ module.exports = (function() {
// get call stack, and analyze it, get all file,method and line number
data.stack = (new Error()).stack.split('\n').slice(3);
+ //Stack trace format : http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
var s=data.stack[0]
, _reg1 = /at\s+(.*)\s+\((.*):(\d*):(\d*)\)/ig, _reg2 = /at\s+()(.*):(\d*):(\d*)/ig
, sp = _reg1.exec(s) || _reg2.exec(s);
View
@@ -2,7 +2,7 @@
"name": "tracer",
"description": "A powerful and customizable logging library for node.js. support color console with timestamp, line number, method name, file name and call stack. you can set transport to file, stream, database(ex: mongodb and clouddb, simpledb). keywords: log, logger, trace ",
"homepage": "http://github.com/baryon/tracer",
- "version": "0.4.1",
+ "version": "0.4.2",
"author": "LI Long <lilong@gmail.com>",
"dependencies": {
"dateformat": "1.0.2-1.2.3",

0 comments on commit 4896dc5

Please sign in to comment.