MCPcopy
hub / github.com/mongodb/node-mongodb-native / attachConnectionFields

Function attachConnectionFields

src/mongo_logger.ts:647–653  ·  view source on GitHub ↗
(log: Record<string, any>, event: any)

Source from the content-addressed store, hash-verified

645}
646
647function attachConnectionFields(log: Record<string, any>, event: any) {
648 const { host, port } = HostAddress.fromString(event.address).toHostPort();
649 log.serverHost = host;
650 log.serverPort = port;
651
652 return log;
653}
654
655function attachSDAMFields(log: Record<string, any>, sdamEvent: SDAMLoggableEvent) {
656 log.topologyId = sdamEvent.topologyId;

Callers 1

defaultLogTransformFunction · 0.85

Calls 2

toHostPortMethod · 0.80
fromStringMethod · 0.45

Tested by

no test coverage detected