Fix stacktrace

This commit is contained in:
Zerebos 2024-12-10 21:22:27 -05:00
parent b01301a44d
commit 57cb98b622
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,11 @@ class Logger {
* @param {Error} error - Error object to log with the message.
*/
stacktrace(pluginName, message, error) {
if (this.#pluginName) {
error = message;
message = pluginName;
pluginName = this.#pluginName;
}
console.error(`%c[${pluginName}]%c ${message}\n\n%c`, this.#nameStyle, "color: red; font-weight: 700;", "color: red;", error);
}