Skip to content

Add more debug logging to the typescript client#4356

Merged
jsdt merged 29 commits intomasterfrom
jsdt/debug-logging
Feb 20, 2026
Merged

Add more debug logging to the typescript client#4356
jsdt merged 29 commits intomasterfrom
jsdt/debug-logging

Conversation

@jsdt
Copy link
Contributor

@jsdt jsdt commented Feb 19, 2026

Description of Changes

This adds some logging utilities, that will probably be helpful for debugging issues. stdbLogger can now accept lazy messages. If you call setGlobalLogLevel, that will set a log level globally. It is set to info by default, but when troubleshooting, we can ask people to run setGlobalLogLevel('trace') and share more detailed logs.

In this PR, it adds a new new logs at the trace level:

  • All outgoing messages to the server
  • All incoming messages from the server
  • After handling a server message, we log the number of triggered row callbacks

There are also some formatting niceties to truncate large arrays and redact fields that look like credentials.

We are also using safe-stable-stringify to handle some cases that would be errors in JSON.stringify.

API and ABI breaking changes

This adds the setGlobalLogLevel function, which is useful for debugging.

Expected complexity level and risk

1.5 - the only real risk here is that

Testing

This has some tests of formatting in logger.test.ts.

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsdt jsdt enabled auto-merge February 20, 2026 00:28
@jsdt jsdt added this pull request to the merge queue Feb 20, 2026
Merged via the queue into master with commit 9cf4af4 Feb 20, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments