From c8fe102fa6bbdc8129a32fb20bfbfde5fae771bb Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Wed, 1 May 2024 14:53:09 +0800 Subject: [PATCH] add formatting to console logs --- scripts/logging.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/logging.js b/scripts/logging.js index 9c33e81..833b0fe 100644 --- a/scripts/logging.js +++ b/scripts/logging.js @@ -30,8 +30,13 @@ export default class logging { (PRIORITY) ? this.clear() : false; - // Display the message. - console.log((MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.message)); + // Display the message. + if (MESSAGE) { + console.log('%c%s%c\n%s', 'font-weight: bold;', this.title, ``, this.message); + } else { + console.log(this.message); + } + try { M.toast({ text: (MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.message) }); } catch (err) {}