Skip to content

Commit

Permalink
Merge pull request #35 from amida-tech/bb-logging
Browse files Browse the repository at this point in the history
logging for blue button
  • Loading branch information
mmccall committed Jul 17, 2014
2 parents 9883658 + 2290088 commit 614c1f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/logger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"use strict";
var winston = require('winston');

var logger = new(winston.Logger)({
"exitOnError": true,
"transports": [
new(winston.transports.Console)({
"colorize": true,
"handleExceptions": true,
"timestamp": true,
}),
]
});

logger.log = function () {
var args = Array.prototype.slice.call(arguments);
args.splice(1, 0, '[BB]');
winston.Logger.prototype.log.apply(this, args);
};

module.exports = logger;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"libxmljs": "*",
"node-uuid": "*",
"underscore": "1.6.x",
"winston": "^0.7.3",
"xdate": "*",
"z-schema": "^2.4.8"
},
Expand Down

0 comments on commit 614c1f7

Please sign in to comment.