diff options
author | Vendicated <vendicated@riseup.net> | 2022-08-31 22:08:05 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-08-31 22:08:05 +0200 |
commit | f60ccb766f30e7518bc348013b72f071f86ecbc6 (patch) | |
tree | 5c1cdb5dfc1bbdc620f034308534eb19e0bcb881 /src/utils/logger.ts | |
parent | bac8a648b6012e221fd2150062d2080b9ed0d702 (diff) | |
download | Vencord-f60ccb766f30e7518bc348013b72f071f86ecbc6.tar.gz Vencord-f60ccb766f30e7518bc348013b72f071f86ecbc6.tar.bz2 Vencord-f60ccb766f30e7518bc348013b72f071f86ecbc6.zip |
Add Plugin.start, make Settings actually start/stop plugins
Diffstat (limited to 'src/utils/logger.ts')
-rw-r--r-- | src/utils/logger.ts | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/utils/logger.ts b/src/utils/logger.ts index be341ee..be32f2b 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,27 +1,33 @@ export default class Logger { constructor(public name: string, public color: string) { } - private _log(level: "log" | "error" | "warn" | "info" | "debug", args: any[]) { - console[level](`%c ${this.name} `, `background: ${this.color}; color: black; font-weight: bold`, ...args); + private _log(level: "log" | "error" | "warn" | "info" | "debug", levelColor: string, args: any[]) { + console[level]( + `%c Vencord %c %c ${this.name} `, + `background: ${levelColor}; color: black; font-weight: bold; border-radius: 5px;`, + "", + `background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;` + , ...args + ); } public log(...args: any[]) { - this._log("log", args); + this._log("log", "#a6d189", args); } public info(...args: any[]) { - this._log("info", args); + this._log("info", "#a6d189", args); } public error(...args: any[]) { - this._log("error", args); + this._log("error", "#e78284", args); } public warn(...args: any[]) { - this._log("warn", args); + this._log("warn", "#e5c890", args); } public debug(...args: any[]) { - this._log("debug", args); + this._log("debug", "#eebebe", args); } }
\ No newline at end of file |