2021-02-19 22:05:48 +00:00
|
|
|
import {EventRegistryHooks, setEventRegistryHooks} from "tc-events";
|
|
|
|
import {LogCategory, logError, logTrace} from "tc-shared/log";
|
2020-02-02 14:05:36 +00:00
|
|
|
|
2021-02-19 22:05:48 +00:00
|
|
|
export * from "tc-events";
|
2020-02-02 14:05:36 +00:00
|
|
|
|
2021-02-19 22:05:48 +00:00
|
|
|
setEventRegistryHooks(new class implements EventRegistryHooks {
|
|
|
|
logAsyncInvokeError(error: any) {
|
|
|
|
logError(LogCategory.EVENT_REGISTRY, tr("Failed to invoke async callback:\n%o"), error);
|
2021-01-22 12:34:43 +00:00
|
|
|
}
|
|
|
|
|
2021-02-19 22:05:48 +00:00
|
|
|
logReactInvokeError(error: any) {
|
|
|
|
logError(LogCategory.EVENT_REGISTRY, tr("Failed to invoke react callback:\n%o"), error);
|
2021-01-22 12:34:43 +00:00
|
|
|
}
|
|
|
|
|
2021-02-19 22:05:48 +00:00
|
|
|
logTrace(message: string, ...args: any[]) {
|
|
|
|
logTrace(LogCategory.EVENT_REGISTRY, message, ...args);
|
2020-02-22 13:30:17 +00:00
|
|
|
}
|
2021-02-19 22:05:48 +00:00
|
|
|
});
|