From debfd42d5187a11fff89bc5dc12d1e3dace96d96 Mon Sep 17 00:00:00 2001 From: Cameron Fischer Date: Thu, 15 Sep 2022 07:10:33 -0400 Subject: [PATCH] Log message not to have spaces and (#6947) --- core/modules/utils/logger.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modules/utils/logger.js b/core/modules/utils/logger.js index 7dc35899f..1bee04646 100644 --- a/core/modules/utils/logger.js +++ b/core/modules/utils/logger.js @@ -48,7 +48,9 @@ Logger.prototype.log = function(/* args */) { this.saveBufferLogger.buffer = this.saveBufferLogger.buffer.slice(-this.saveBufferLogger.saveLimit); } if(console !== undefined && console.log !== undefined) { - return Function.apply.call(console.log, console, [$tw.utils.terminalColour(this.colour),this.componentName + ":"].concat(Array.prototype.slice.call(arguments,0)).concat($tw.utils.terminalColour())); + var logMessage = [$tw.utils.terminalColour(this.colour) + this.componentName + ":"].concat(Array.prototype.slice.call(arguments,0)); + logMessage[logMessage.length-1] += $tw.utils.terminalColour(); + return Function.apply.call(console.log, console, logMessage); } } };