summaryrefslogtreecommitdiff
path: root/frontend/src/logger.ts
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2023-12-30 00:46:59 -0500
committerAAGaming <aagaming@riseup.net>2023-12-30 00:46:59 -0500
commit6522ebf0cad1723a278144b6c5d8557cd47e52d6 (patch)
tree8c048cfe75c73938d347f8e6cd7b8bb23269df2c /frontend/src/logger.ts
parent6042ca56b85fffe6bac4cac5a2965ee87c4e1e32 (diff)
downloaddecky-loader-6522ebf0cad1723a278144b6c5d8557cd47e52d6.tar.gz
decky-loader-6522ebf0cad1723a278144b6c5d8557cd47e52d6.zip
Implement legacy & modern plugin method calls over WS
This version builds fine and runs all of the 14 plugins I have installed perfectly, so we're really close to having this done.
Diffstat (limited to 'frontend/src/logger.ts')
-rw-r--r--frontend/src/logger.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/frontend/src/logger.ts b/frontend/src/logger.ts
index 143bef16..80019fdb 100644
--- a/frontend/src/logger.ts
+++ b/frontend/src/logger.ts
@@ -18,6 +18,16 @@ export const debug = (name: string, ...args: any[]) => {
);
};
+export const warn = (name: string, ...args: any[]) => {
+ console.warn(
+ `%c Decky %c ${name} %c`,
+ 'background: #16a085; color: black;',
+ 'background: #ffbb00; color: black;',
+ 'color: blue;',
+ ...args,
+ );
+};
+
export const error = (name: string, ...args: any[]) => {
console.error(
`%c Decky %c ${name} %c`,
@@ -41,6 +51,10 @@ class Logger {
debug(this.name, ...args);
}
+ warn(...args: any[]) {
+ warn(this.name, ...args);
+ }
+
error(...args: any[]) {
error(this.name, ...args);
}