making client logs more visible

This commit is contained in:
Jarrod Overson 2013-11-20 16:50:53 -08:00
parent 17190d25c1
commit 27512c9dc6
3 changed files with 5 additions and 2 deletions

View File

@ -131,7 +131,9 @@ module.exports = function(grunt) {
});
phantomjs.on('console',console.log.bind(console));
phantomjs.on('verbose',grunt.verbose.writeln.bind(grunt.verbose));
phantomjs.on('verbose',function(msg) {
grunt.verbose.writeln('\nlog: '.yellow + msg);
});
phantomjs.on('debug', grunt.log.debug.bind(grunt.log, 'phantomjs'));
phantomjs.on('write', grunt.log.write.bind(grunt.log));
phantomjs.on('writeln', grunt.log.writeln.bind(grunt.log));

View File

@ -7,7 +7,7 @@ var phantom = {};
if (window._phantom) {
console.log = function(){
phantom.sendMessage('verbose',Array.prototype.slice.apply(arguments).join(', '));
phantom.sendMessage('verbose', Array.prototype.slice.apply(arguments).join(', '));
};
}

View File

@ -10,6 +10,7 @@ Player.prototype.pause = function() {
};
Player.prototype.resume = function() {
console.log('in resume');
if (this.isPlaying) {
throw new Error("song is already playing");
}