Skip to content

Commit

Permalink
Fix pretty print
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Radchenko committed Feb 18, 2016
1 parent 5efabcb commit d6633ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/routes/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module.exports = function (emitter) {
var providerId = request.params.providerId
var id = request.params.id
var payload = request.payload

payload['project'] = id

// TODO: check whether the project exists + check if the provider is associated with the project
Expand Down
6 changes: 3 additions & 3 deletions lib/util/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ var prettyPrint = require('./prettyPrint.js')
module.exports = function (module) {
var filename = module.id
return {
info: function (msg, vars) {
info(msg, vars) {
if (vars) winston.info('[' + filename + ']' + ': ' + msg, prettyPrint(vars))
else winston.info('[' + filename + ']' + ': ' + msg)
},
warn: function (msg, vars) {
warn(msg, vars) {
if (vars) winston.warn('[' + filename + ']' + ': ' + msg, prettyPrint(vars))
else winston.warn('[' + filename + ']' + ': ' + msg)
},
debug: function (msg, vars) {
debug(msg, vars) {
if (vars) winston.debug('[' + filename + ']' + ': ' + msg, prettyPrint(vars))
else winston.debug('[' + filename + ']' + ': ' + msg)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/util/prettyPrint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var prettyJson = function (json) {
JSON.stringify(json, null, 2)
return JSON.stringify(json, null, 2)
}

module.exports = prettyJson

0 comments on commit d6633ff

Please sign in to comment.