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

Method setupLogging

test/tools/runner/config.ts:469–477  ·  test/tools/runner/config.ts::TestConfiguration.setupLogging
(options: MongoClientOptions, id?: string)

Source from the content-addressed store, hash-verified

467 testsToEnableLogging = flakyTests;
468
469 setupLogging(options: MongoClientOptions, id?: string) {
470 id ??= new ObjectId().toString();
471 this.logs = [];
472 const write = log => this.logs.push({ t: log.t, id, ...log });
473 options.mongodbLogPath = { write };
474 options.mongodbLogComponentSeverities = { default: class="st">'trace' };
475 options.mongodbLogMaxDocumentLength = 300;
476 return options;
477 }
478
479 beforeEachLogging(ctx: Context) {
480 this.loggingEnabled = this.testsToEnableLogging.includes(ctx.currentTest.fullTitle());

Callers 2

newClientMethod · 0.95
constructorMethod · 0.80

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected