Skip to content

Commit

Permalink
log.message now writes to stdout in w. default loglevel (1) and above…
Browse files Browse the repository at this point in the history
…; related issues: dalekjs/dalek#66 & dalekjs/dalek#78
  • Loading branch information
mdix committed Mar 31, 2014
1 parent 72ead54 commit 2065c43
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 18 additions & 0 deletions lib/loglevel/level1.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ var LogLevel1 = Log;

module.exports = LogLevel1;

/**
* Outputs a browser or user log message
*
* @method outputLogUser
* @param {string} type
* @param {string} message
* @chainable
*/

LogLevel1.prototype.outputLogUser = function (type, message) {
if (type === 'browser' || type === 'user') {
this.echo(this.symbol('<>'), {nl: false, ec: true, foreground: 'cyan'});
this.echo('[' + type.toUpperCase() + ']', {nl: false, foreground: 'whiteBright', background: 'bgCyanBright'});
this.echo(' ' + message, {foreground: 'cyan'});
}
return this;
};

/**
* Outputs a message when the testrunner starts
*
Expand Down
20 changes: 1 addition & 19 deletions lib/loglevel/level4.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,4 @@ var LogLevel4 = Log;
* @module LogLevel4
*/

module.exports = LogLevel4;

/**
* Outputs a system/driver/browser/user log message
*
* @method outputLogUser
* @param {string} type
* @param {string} message
* @chainable
*/

LogLevel4.prototype.outputLogUser = function (type, message) {
if (type === 'browser' || type === 'user') {
this.echo(this.symbol('<>'), {nl: false, ec: true, foreground: 'cyan'});
this.echo('[' + type.toUpperCase() + ']', {nl: false, foreground: 'whiteBright', background: 'bgCyanBright'});
this.echo(' ' + message, {foreground: 'cyan'});
}
return this;
};
module.exports = LogLevel4;

0 comments on commit 2065c43

Please sign in to comment.