add formatting to console logs

This commit is contained in:
buzz-lightsnack-2007 2024-05-01 14:53:09 +08:00
parent f930dbea0c
commit c8fe102fa6

View file

@ -31,7 +31,12 @@ export default class logging {
(PRIORITY) ? this.clear() : false;
// Display the message.
console.log((MESSAGE ? (this.title).concat(`\n`) : ``).concat(this.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) {}