( log: Record<string, any>, serverSelectionEvent: ServerSelectionEvent, maxDocumentLength: number = DEFAULT_MAX_DOCUMENT_LENGTH )
| 612 | } |
| 613 | |
| 614 | function attachServerSelectionFields( |
| 615 | log: Record<string, any>, |
| 616 | serverSelectionEvent: ServerSelectionEvent, |
| 617 | maxDocumentLength: number = DEFAULT_MAX_DOCUMENT_LENGTH |
| 618 | ) { |
| 619 | const { selector, operation, topologyDescription, message } = serverSelectionEvent; |
| 620 | log.selector = stringifyWithMaxLen(selector, maxDocumentLength); |
| 621 | log.operation = operation; |
| 622 | log.topologyDescription = stringifyWithMaxLen(topologyDescription, maxDocumentLength); |
| 623 | log.message = message; |
| 624 | |
| 625 | return log; |
| 626 | } |
| 627 | |
| 628 | function attachCommandFields( |
| 629 | log: Record<string, any>, |
no test coverage detected