Skip to content

Commit

Permalink
API-1 - Logging API codeless block improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
macbookpro committed Feb 19, 2024
1 parent a3e562a commit 150e7d7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/logging/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -168,5 +170,4 @@ export default class Logging {

return message
}

}

0 comments on commit 150e7d7

Please sign in to comment.