prepend "Karousel:" to logs
This commit is contained in:
@@ -20,8 +20,8 @@ function catchWrap(f: () => void) {
|
||||
try {
|
||||
f();
|
||||
} catch (error: any) {
|
||||
console.log(error);
|
||||
console.log(error.stack);
|
||||
log(error);
|
||||
log(error.stack);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
3
src/utils/log.ts
Normal file
3
src/utils/log.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
function log(...args: any[]) {
|
||||
console.log("Karousel:", ...args);
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class ClientManager {
|
||||
parsedWindowRules = JSON.parse(config.windowRules);
|
||||
} catch (error: any) {
|
||||
notificationInvalidWindowRules.sendEvent();
|
||||
console.log("failed to parse windowRules:", error);
|
||||
log("failed to parse windowRules:", error);
|
||||
}
|
||||
this.windowRuleEnforcer = new WindowRuleEnforcer(parsedWindowRules);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user