diff --git a/src/logging/index.js b/src/logging/index.js index b9ddc6a1..70290648 100644 --- a/src/logging/index.js +++ b/src/logging/index.js @@ -97,11 +97,13 @@ export default class Logging { } push(logger, logLevel, message, exception) { - if (typeof message !== 'string') { - message = this.convertMessageToString(message) - } - - this.messages.push({ logger, message, exception, 'log-level': logLevel, timestamp: Date.now() }) + this.messages.push({ + logger, + message: this.convertMessageToString(message), + exception, + 'log-level': logLevel, + timestamp: Date.now() + }) this.checkMessagesLen() } @@ -168,5 +170,4 @@ export default class Logging { return message } - }