Skip to content

Commit

Permalink
improve logging colors
Browse files Browse the repository at this point in the history
  • Loading branch information
mofux committed Sep 11, 2017
1 parent 4776992 commit ccb039b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/smtp-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function(logger) {
var output = '';

// add a logging level indicator up front
output += levels[level].bg(' ' + levels[level].sign + ' ') + ' ';
output += colors.white(levels[level].bg(' ' + levels[level].sign + ' ') + ' ');

// log the id and optionally the subId
output += id + colors.grey('#') + (subId || '0') + ' ';
Expand Down
4 changes: 2 additions & 2 deletions test/3-relay-simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function() {
port: 2323,
logger: {
verbose: function() {
debug ? console.log(colors.bgYellow(' LOCAL ') + ' ' + arguments[0]) : function(){};
debug ? console.log(colors.white(colors.bgYellow(' LOCAL ') + ' ') + arguments[0]) : function () { };
}
},
domains: ['localhost']
Expand All @@ -46,7 +46,7 @@ module.exports = function() {
port: 2324,
logger: {
verbose: function() {
debug ? console.log(colors.bgWhite(' REMOT ') + ' ' + arguments[0]) : function(){};
debug ? console.log(colors.white(colors.bgCyan(' REMOT ') + ' ' + arguments[0])) : function(){};
}
},
relay: {
Expand Down
4 changes: 2 additions & 2 deletions test/4-relay-temporary-error.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = function() {
port: 2328,
logger: {
verbose: function() {
debug ? console.log(colors.bgYellow(' LOCAL ') + ' ' + arguments[0]) : function(){};
debug ? console.log(colors.white(colors.bgYellow(' LOCAL ') + ' ') + arguments[0]) : function(){};
}
},
domains: ['localhost']
Expand All @@ -60,7 +60,7 @@ module.exports = function() {
port: 2329,
logger: {
verbose: function() {
debug ? console.log(colors.bgWhite(' REMOT ') + ' ' + arguments[0]) : function(){};
debug ? console.log(colors.white(colors.bgCyan(' REMOT ') + ' ') + arguments[0]) : function(){};
}
},
relay: {
Expand Down

0 comments on commit ccb039b

Please sign in to comment.