Pick up new events API

This commit is contained in:
Andras Schmelczer 2025-12-07 14:46:41 +00:00
parent ce31969a44
commit c6f7ae1677
7 changed files with 17 additions and 17 deletions

View file

@ -42,7 +42,7 @@ export class MockAgent extends MockClient {
"Connection check failed"
);
this.client.logger.addOnMessageListener((logLine: LogLine) => {
this.client.logger.onLogEmitted.add((logLine: LogLine) => {
const state = this.client.getSettings().isSyncEnabled
? "(online) "
: "(offline)";
@ -198,14 +198,14 @@ export class MockAgent extends MockClient {
);
this.client.logger.info(
"Local files: " +
Array.from(otherAgent.localFiles.keys()).join(", ")
Array.from(otherAgent.localFiles.keys()).join(", ")
);
otherAgent.client.logger.info(
"Local data: " + JSON.stringify(otherAgent.data, null, 2)
);
otherAgent.client.logger.info(
"Local files: " +
Array.from(otherAgent.localFiles.keys()).join(", ")
Array.from(otherAgent.localFiles.keys()).join(", ")
);
throw e;