don't intercept console error in plugins, causes too much issues; need to research a better way

This commit is contained in:
Iuri Matias 2017-02-26 18:47:52 -05:00
parent 0060dbe53f
commit 60a617a28e
1 changed files with 6 additions and 5 deletions

View File

@ -40,11 +40,12 @@ Plugin.prototype.interceptLogs = function(context) {
var self = this;
// TODO: this is a bit nasty, figure out a better way
context.console = context.console || console;
context.console.error = function(txt) {
// TODO: logger should support an array instead of a single argument
//self.logger.error.apply(self.logger, arguments);
self.logger.error(self.name + " > " + txt);
};
//context.console.error = function(txt) {
// // TODO: logger should support an array instead of a single argument
// //self.logger.error.apply(self.logger, arguments);
// self.logger.error(self.name + " > " + txt);
//};
context.console.log = function(txt) {
self.logger.info(self.name + " > " + txt);
};