Files
Jeffrey Dallatezza 9cf4af4ff2 Add more debug logging to the typescript client (#4356)
# 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`.
2026-02-20 00:36:18 +00:00
..
2026-02-16 02:21:52 +00:00
2026-02-16 02:21:52 +00:00
2026-02-16 02:21:52 +00:00