You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*: propagate Logger through drpcmanager, drpcstream, drpcwire, and drpcpool
Thread the Logger interface through the entire DRPC stack so that all
packages have access to structured logging:
- drpcwire.Writer: add NewWriterWithLogger constructor, replace
drpcdebug.Log calls with Logger.Debugf for buffer flush events.
- drpcstream.Options: add Logger field, default to drpc.DefaultLogger.
Replace drpcdebug.Log calls with Logger.Debugf for stream lifecycle
events (HANDLE, SEND, FIN, FLUSH, CALL).
- drpcmanager.Options: add Logger field, default to drpc.DefaultLogger.
Replace drpcdebug.Log calls with Logger.Debugf for connection management
events (WAIT, TERM, READ, STREAM, CANCEL, BUSY, UNFIN, CLEAN). Propagate
Logger to Writer and Stream instances it creates.
- drpcpool.Options: add Logger field, default to drpc.DefaultLogger.
Replace drpcdebug.Log calls with Logger.Debugf for pool operations
(CLOSE, TAKEN, PUT).
- drpcserver: propagate its Logger to the managers it creates via
ServeOne, ensuring the entire call stack shares the same logger.
All packages now use Logger.Debugf instead of the build-tag-gated
drpcdebug.Log. Since DefaultLogger.Debugf is a no-op, production behavior
is unchanged. Custom Logger implementations (e.g. CockroachDB's) can
route these to verbose/conditional logging.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
0 commit comments