1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00

Change child loggers (getChild) to LogSpans

With the child loggers, we ended up not seeing the logs in the rageshake because it requires a custom configuration in element call to write the child loggers (with getChild) into the rageshake log.
LogSpans are a lightweight alternative that still use the same logger but only extend the prefix and hence end up in the rageshake without registering new loggers.
It prohibits the footgun of not getting logs in the rageshake.
This commit is contained in:
Timo
2025-04-16 14:05:47 +02:00
parent a52c64b747
commit d445b600f9
10 changed files with 37 additions and 36 deletions

View File

@ -28,8 +28,8 @@ It is very specific to the MembershipManager.spec.ts file and introduces the fol
import { TestEnvironment } from "jest-environment-jsdom";
import { logger as rootLogger } from "../../../src/logger";
const logger = rootLogger.getChild("[MatrixRTCSession]");
import { LogSpan, logger as rootLogger } from "../../../src/logger";
const logger = new LogSpan(rootLogger, "[MatrixRTCSession]");
class MemberManagerTestEnvironment extends TestEnvironment {
handleTestEvent(event: any) {