# HG changeset patch # User drewp@bigasterisk.com # Date 1685654480 25200 # Node ID cdfd2901918ac954d0347de9cf92a45fbee525eb # Parent ed0db55f604cf7b03916ebd8e4b4d24a13a38079 logging diff -r ed0db55f604c -r cdfd2901918a light9/web/RdfDbChannel.ts --- a/light9/web/RdfDbChannel.ts Thu Jun 01 14:20:40 2023 -0700 +++ b/light9/web/RdfDbChannel.ts Thu Jun 01 14:21:20 2023 -0700 @@ -57,9 +57,9 @@ return true; } - disconnect() { + disconnect(why:string) { // will be followed by an autoconnect - log("disconnect requested"); + log("disconnect requested:", why); if (this.ws !== undefined) { const closeHandler = this.ws.onclose?.bind(this.ws); if (!closeHandler) { @@ -123,7 +123,7 @@ private onWsError(e: Event) { log("ws error", e); - this.disconnect(); + this.disconnect("ws error"); this.updateStatus(); } diff -r ed0db55f604c -r cdfd2901918a light9/web/SyncedGraph.ts --- a/light9/web/SyncedGraph.ts Thu Jun 01 14:20:40 2023 -0700 +++ b/light9/web/SyncedGraph.ts Thu Jun 01 14:21:20 2023 -0700 @@ -38,7 +38,7 @@ this.autoDeps = new AutoDependencies(this); this.autoDeps.graphError.subscribe((e) => { log("graph learned of error - reconnecting", e); - this.client.disconnect(); + this.client.disconnect("graph error"); }); this.clearGraph(); diff -r ed0db55f604c -r cdfd2901918a light9/web/patch.ts --- a/light9/web/patch.ts Thu Jun 01 14:20:40 2023 -0700 +++ b/light9/web/patch.ts Thu Jun 01 14:21:20 2023 -0700 @@ -77,6 +77,9 @@ } dump(): string { + if (this.dels.size + this.adds.size > 20) { + return this.summary(); + } const lines: string[] = []; const s = (term: N3.Term): string => { if (term.termType == "Literal") return term.value; diff -r ed0db55f604c -r cdfd2901918a light9/web/rdfdbclient.ts --- a/light9/web/rdfdbclient.ts Thu Jun 01 14:20:40 2023 -0700 +++ b/light9/web/rdfdbclient.ts Thu Jun 01 14:21:20 2023 -0700 @@ -44,8 +44,8 @@ this._continueSending(); } - disconnect() { - this.channel.disconnect(); + disconnect(why:string) { + this.channel.disconnect(why); } async _continueSending() {