@mongosh/logging 3.0.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,783 +0,0 @@
1
- import redactInfo from 'mongodb-redact';
2
- import { redactURICredentials } from '@mongosh/history';
3
- import type {
4
- MongoshBus,
5
- ApiEventWithArguments,
6
- ApiEvent,
7
- UseEvent,
8
- EvaluateInputEvent,
9
- ShowEvent,
10
- ConnectEvent,
11
- ScriptLoadFileEvent,
12
- StartLoadingCliScriptsEvent,
13
- StartMongoshReplEvent,
14
- GlobalConfigFileLoadEvent,
15
- CryptLibrarySkipEvent,
16
- CryptLibraryFoundEvent,
17
- SnippetsCommandEvent,
18
- SnippetsErrorEvent,
19
- SnippetsFetchIndexErrorEvent,
20
- SnippetsFetchIndexEvent,
21
- SnippetsLoadedEvent,
22
- SnippetsLoadSnippetEvent,
23
- SnippetsNpmDownloadActiveEvent,
24
- SnippetsNpmDownloadFailedEvent,
25
- SnippetsNpmLookupEvent,
26
- SnippetsRunNpmEvent,
27
- SnippetsTransformErrorEvent,
28
- EditorRunEditCommandEvent,
29
- EditorReadVscodeExtensionsDoneEvent,
30
- EditorReadVscodeExtensionsFailedEvent,
31
- FetchingUpdateMetadataEvent,
32
- FetchingUpdateMetadataCompleteEvent,
33
- SessionStartedEvent,
34
- } from '@mongosh/types';
35
- import { inspect } from 'util';
36
- import type { MongoLogWriter } from 'mongodb-log-writer';
37
- import { mongoLogId } from 'mongodb-log-writer';
38
- import type { MongoshAnalytics } from './analytics-helpers';
39
- import { hookLogger } from '@mongodb-js/devtools-connect';
40
-
41
- /**
42
- * A helper class for keeping track of how often specific events occurred.
43
- */
44
- class MultiSet<T extends Record<string, any>> {
45
- _entries: Map<string, number> = new Map();
46
-
47
- add(entry: T): void {
48
- const key = JSON.stringify(Object.entries(entry).sort());
49
- this._entries.set(key, (this._entries.get(key) ?? 0) + 1);
50
- }
51
-
52
- clear(): void {
53
- this._entries.clear();
54
- }
55
-
56
- *[Symbol.iterator](): Iterator<[T, number]> {
57
- for (const [key, count] of this._entries) {
58
- yield [Object.fromEntries(JSON.parse(key)) as T, count];
59
- }
60
- }
61
- }
62
-
63
- /**
64
- * It transforms a random string into snake case. Snake case is completely
65
- * lowercase and uses '_' to separate words. For example:
66
- *
67
- * This function defines a "word" as a sequence of characters until the next `.` or capital letter.
68
- *
69
- * 'Random String' => 'random_string'
70
- *
71
- * It will also remove any non alphanumeric characters to ensure the string
72
- * is compatible with Segment. For example:
73
- *
74
- * 'Node.js REPL Instantiation' => 'node_js_repl_instantiation'
75
- *
76
- * @param str Any non snake-case formatted string
77
- * @returns The snake-case formatted string
78
- */
79
- export function toSnakeCase(str: string): string {
80
- const matches = str.match(
81
- /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
82
- );
83
- if (!matches) {
84
- return str;
85
- }
86
-
87
- return matches.map((x) => x.toLowerCase()).join('_');
88
- }
89
-
90
- /**
91
- * Connect a MongoshBus instance that emits events to logging and analytics providers.
92
- *
93
- * @param bus A MongoshBus instance
94
- * @param log A MongoLogWriter instance
95
- * @param makeAnalytics A function that returns an analytics provider (or throws otherwise)
96
- */
97
- export function setupLoggerAndTelemetry(
98
- bus: MongoshBus,
99
- log: MongoLogWriter,
100
- analytics: MongoshAnalytics,
101
- userTraits: any,
102
- mongosh_version: string
103
- ): void {
104
- const { logId: session_id } = log;
105
- let userId: string;
106
- let telemetryAnonymousId: string;
107
-
108
- userTraits = { ...userTraits, session_id };
109
-
110
- const trackProperties = {
111
- mongosh_version,
112
- session_id,
113
- };
114
-
115
- const getTelemetryUserIdentity = () => ({
116
- anonymousId: telemetryAnonymousId ?? userId,
117
- });
118
-
119
- // We emit different analytics events for loading files and evaluating scripts
120
- // depending on whether we're already in the REPL or not yet. We store the
121
- // state here so that the places where the events are emitted don't have to
122
- // be aware of this distinction.
123
- let hasStartedMongoshRepl = false;
124
- bus.on('mongosh:start-mongosh-repl', (ev: StartMongoshReplEvent) => {
125
- log.info('MONGOSH', mongoLogId(1_000_000_002), 'repl', 'Started REPL', ev);
126
- hasStartedMongoshRepl = true;
127
- });
128
-
129
- let usesShellOption = false;
130
- bus.on(
131
- 'mongosh:start-loading-cli-scripts',
132
- (event: StartLoadingCliScriptsEvent) => {
133
- log.info(
134
- 'MONGOSH',
135
- mongoLogId(1_000_000_003),
136
- 'repl',
137
- 'Start loading CLI scripts'
138
- );
139
- usesShellOption = event.usesShellOption;
140
- }
141
- );
142
-
143
- bus.on('mongosh:connect', function (args: ConnectEvent) {
144
- const { uri, resolved_hostname, ...argsWithoutUriAndHostname } = args;
145
- const connectionUri = uri && redactURICredentials(uri);
146
- const atlasHostname = {
147
- atlas_hostname: args.is_atlas ? resolved_hostname : null,
148
- };
149
- const properties = {
150
- ...trackProperties,
151
- ...argsWithoutUriAndHostname,
152
- ...atlasHostname,
153
- };
154
-
155
- log.info(
156
- 'MONGOSH',
157
- mongoLogId(1_000_000_004),
158
- 'connect',
159
- 'Connecting to server',
160
- {
161
- userId,
162
- telemetryAnonymousId,
163
- connectionUri,
164
- ...properties,
165
- }
166
- );
167
-
168
- analytics.track({
169
- ...getTelemetryUserIdentity(),
170
- event: 'New Connection',
171
- properties,
172
- });
173
- });
174
-
175
- bus.on('mongosh:start-session', function (args: SessionStartedEvent) {
176
- const normalisedTimingsArray = Object.entries(args.timings).map(
177
- ([key, duration]) => {
178
- const snakeCaseKey = toSnakeCase(key);
179
- return [snakeCaseKey, duration];
180
- }
181
- );
182
-
183
- const normalisedTimings = Object.fromEntries(normalisedTimingsArray);
184
- analytics.track({
185
- ...getTelemetryUserIdentity(),
186
- event: 'Startup Time',
187
- properties: {
188
- ...trackProperties,
189
- is_interactive: args.isInteractive,
190
- js_context: args.jsContext,
191
- ...normalisedTimings,
192
- },
193
- });
194
- });
195
-
196
- bus.on(
197
- 'mongosh:new-user',
198
- function (newTelemetryUserIdentity: {
199
- userId: string;
200
- anonymousId: string;
201
- }) {
202
- if (!newTelemetryUserIdentity.anonymousId) {
203
- userId = newTelemetryUserIdentity.userId;
204
- }
205
- telemetryAnonymousId = newTelemetryUserIdentity.anonymousId;
206
- analytics.identify({
207
- anonymousId: newTelemetryUserIdentity.anonymousId,
208
- traits: userTraits,
209
- });
210
- }
211
- );
212
-
213
- bus.on(
214
- 'mongosh:update-user',
215
- function (updatedTelemetryUserIdentity: {
216
- userId: string;
217
- anonymousId?: string;
218
- }) {
219
- if (updatedTelemetryUserIdentity.anonymousId) {
220
- telemetryAnonymousId = updatedTelemetryUserIdentity.anonymousId;
221
- } else {
222
- userId = updatedTelemetryUserIdentity.userId;
223
- }
224
- analytics.identify({
225
- ...getTelemetryUserIdentity(),
226
- traits: userTraits,
227
- });
228
- log.info('MONGOSH', mongoLogId(1_000_000_005), 'config', 'User updated');
229
- }
230
- );
231
-
232
- bus.on('mongosh:error', function (error: Error, context: string) {
233
- const mongoshError = error as {
234
- name: string;
235
- message: string;
236
- code: any;
237
- scope: any;
238
- metadata: any;
239
- };
240
-
241
- if (context === 'fatal') {
242
- log.fatal(
243
- 'MONGOSH',
244
- mongoLogId(1_000_000_006),
245
- context,
246
- `${mongoshError.name}: ${mongoshError.message}`,
247
- error
248
- );
249
- } else {
250
- log.error(
251
- 'MONGOSH',
252
- mongoLogId(1_000_000_006),
253
- context,
254
- `${mongoshError.name}: ${mongoshError.message}`,
255
- error
256
- );
257
- }
258
-
259
- if (error.name.includes('Mongosh')) {
260
- analytics.track({
261
- ...getTelemetryUserIdentity(),
262
- event: 'Error',
263
- properties: {
264
- ...trackProperties,
265
- name: mongoshError.name,
266
- code: mongoshError.code,
267
- scope: mongoshError.scope,
268
- metadata: mongoshError.metadata,
269
- },
270
- });
271
- }
272
- });
273
-
274
- bus.on(
275
- 'mongosh:globalconfig-load',
276
- function (args: GlobalConfigFileLoadEvent) {
277
- log.info(
278
- 'MONGOSH',
279
- mongoLogId(1_000_000_048),
280
- 'config',
281
- 'Loading global configuration file',
282
- args
283
- );
284
- }
285
- );
286
-
287
- bus.on('mongosh:evaluate-input', function (args: EvaluateInputEvent) {
288
- log.info(
289
- 'MONGOSH',
290
- mongoLogId(1_000_000_007),
291
- 'repl',
292
- 'Evaluating input',
293
- args
294
- );
295
- });
296
-
297
- bus.on('mongosh:use', function (args: UseEvent) {
298
- log.info(
299
- 'MONGOSH',
300
- mongoLogId(1_000_000_008),
301
- 'shell-api',
302
- 'Used "use" command',
303
- args
304
- );
305
-
306
- analytics.track({
307
- ...getTelemetryUserIdentity(),
308
- event: 'Use',
309
- properties: {
310
- ...trackProperties,
311
- },
312
- });
313
- });
314
-
315
- bus.on('mongosh:show', function (args: ShowEvent) {
316
- log.info(
317
- 'MONGOSH',
318
- mongoLogId(1_000_000_009),
319
- 'shell-api',
320
- 'Used "show" command',
321
- args
322
- );
323
-
324
- analytics.track({
325
- ...getTelemetryUserIdentity(),
326
- event: 'Show',
327
- properties: {
328
- ...trackProperties,
329
- method: args.method,
330
- },
331
- });
332
- });
333
-
334
- bus.on('mongosh:setCtx', function (args: ApiEventWithArguments) {
335
- log.info(
336
- 'MONGOSH',
337
- mongoLogId(1_000_000_010),
338
- 'shell-api',
339
- 'Initialized context',
340
- args
341
- );
342
- });
343
-
344
- bus.on(
345
- 'mongosh:api-call-with-arguments',
346
- function (args: ApiEventWithArguments) {
347
- // TODO: redactInfo cannot handle circular or otherwise nontrivial input
348
- let arg;
349
- try {
350
- arg = JSON.parse(JSON.stringify(args));
351
- } catch {
352
- arg = { _inspected: inspect(args) };
353
- }
354
- log.info(
355
- 'MONGOSH',
356
- mongoLogId(1_000_000_011),
357
- 'shell-api',
358
- 'Performed API call',
359
- redactInfo(arg)
360
- );
361
- }
362
- );
363
-
364
- bus.on('mongosh:api-load-file', function (args: ScriptLoadFileEvent) {
365
- log.info(
366
- 'MONGOSH',
367
- mongoLogId(1_000_000_012),
368
- 'shell-api',
369
- 'Loading file via load()',
370
- args
371
- );
372
-
373
- analytics.track({
374
- ...getTelemetryUserIdentity(),
375
- event: hasStartedMongoshRepl ? 'Script Loaded' : 'Script Loaded CLI',
376
- properties: {
377
- ...trackProperties,
378
- nested: args.nested,
379
- ...(hasStartedMongoshRepl ? {} : { shell: usesShellOption }),
380
- },
381
- });
382
- });
383
-
384
- bus.on('mongosh:eval-cli-script', function () {
385
- log.info(
386
- 'MONGOSH',
387
- mongoLogId(1_000_000_013),
388
- 'repl',
389
- 'Evaluating script passed on the command line'
390
- );
391
-
392
- analytics.track({
393
- ...getTelemetryUserIdentity(),
394
- event: 'Script Evaluated',
395
- properties: {
396
- ...trackProperties,
397
- shell: usesShellOption,
398
- },
399
- });
400
- });
401
-
402
- bus.on('mongosh:mongoshrc-load', function () {
403
- log.info(
404
- 'MONGOSH',
405
- mongoLogId(1_000_000_014),
406
- 'repl',
407
- 'Loading .mongoshrc.js'
408
- );
409
-
410
- analytics.track({
411
- ...getTelemetryUserIdentity(),
412
- event: 'Mongoshrc Loaded',
413
- properties: {
414
- ...trackProperties,
415
- },
416
- });
417
- });
418
-
419
- bus.on('mongosh:mongoshrc-mongorc-warn', function () {
420
- log.info(
421
- 'MONGOSH',
422
- mongoLogId(1_000_000_015),
423
- 'repl',
424
- 'Warning about .mongorc.js/.mongoshrc.js mismatch'
425
- );
426
-
427
- analytics.track({
428
- ...getTelemetryUserIdentity(),
429
- event: 'Mongorc Warning',
430
- properties: {
431
- ...trackProperties,
432
- },
433
- });
434
- });
435
-
436
- bus.on(
437
- 'mongosh:crypt-library-load-skip',
438
- function (ev: CryptLibrarySkipEvent) {
439
- log.info(
440
- 'AUTO-ENCRYPTION',
441
- mongoLogId(1_000_000_050),
442
- 'crypt-library',
443
- 'Skipping shared library candidate',
444
- ev
445
- );
446
- }
447
- );
448
-
449
- bus.on(
450
- 'mongosh:crypt-library-load-found',
451
- function (ev: CryptLibraryFoundEvent) {
452
- log.warn(
453
- 'AUTO-ENCRYPTION',
454
- mongoLogId(1_000_000_051),
455
- 'crypt-library',
456
- 'Accepted shared library candidate',
457
- {
458
- cryptSharedLibPath: ev.cryptSharedLibPath,
459
- expectedVersion: ev.expectedVersion.versionStr,
460
- }
461
- );
462
- }
463
- );
464
-
465
- bus.on('mongosh-snippets:loaded', function (ev: SnippetsLoadedEvent) {
466
- log.info(
467
- 'MONGOSH-SNIPPETS',
468
- mongoLogId(1_000_000_019),
469
- 'snippets',
470
- 'Loaded snippets',
471
- ev
472
- );
473
- });
474
-
475
- bus.on('mongosh-snippets:npm-lookup', function (ev: SnippetsNpmLookupEvent) {
476
- log.info(
477
- 'MONGOSH-SNIPPETS',
478
- mongoLogId(1_000_000_020),
479
- 'snippets',
480
- 'Performing npm lookup',
481
- ev
482
- );
483
- });
484
-
485
- bus.on('mongosh-snippets:npm-lookup-stopped', function () {
486
- log.info(
487
- 'MONGOSH-SNIPPETS',
488
- mongoLogId(1_000_000_021),
489
- 'snippets',
490
- 'npm lookup stopped'
491
- );
492
- });
493
-
494
- bus.on(
495
- 'mongosh-snippets:npm-download-failed',
496
- function (ev: SnippetsNpmDownloadFailedEvent) {
497
- log.info(
498
- 'MONGOSH-SNIPPETS',
499
- mongoLogId(1_000_000_022),
500
- 'snippets',
501
- 'npm download failed',
502
- ev
503
- );
504
- }
505
- );
506
-
507
- bus.on(
508
- 'mongosh-snippets:npm-download-active',
509
- function (ev: SnippetsNpmDownloadActiveEvent) {
510
- log.info(
511
- 'MONGOSH-SNIPPETS',
512
- mongoLogId(1_000_000_023),
513
- 'snippets',
514
- 'npm download active',
515
- ev
516
- );
517
- }
518
- );
519
-
520
- bus.on(
521
- 'mongosh-snippets:fetch-index',
522
- function (ev: SnippetsFetchIndexEvent) {
523
- log.info(
524
- 'MONGOSH-SNIPPETS',
525
- mongoLogId(1_000_000_024),
526
- 'snippets',
527
- 'Fetching snippet index',
528
- ev
529
- );
530
- }
531
- );
532
-
533
- bus.on('mongosh-snippets:fetch-cache-invalid', function () {
534
- log.info(
535
- 'MONGOSH-SNIPPETS',
536
- mongoLogId(1_000_000_025),
537
- 'snippets',
538
- 'Snippet cache invalid'
539
- );
540
- });
541
-
542
- bus.on(
543
- 'mongosh-snippets:fetch-index-error',
544
- function (ev: SnippetsFetchIndexErrorEvent) {
545
- log.info(
546
- 'MONGOSH-SNIPPETS',
547
- mongoLogId(1_000_000_026),
548
- 'snippets',
549
- 'Fetching snippet index failed',
550
- ev
551
- );
552
- }
553
- );
554
-
555
- bus.on('mongosh-snippets:fetch-index-done', function () {
556
- log.info(
557
- 'MONGOSH-SNIPPETS',
558
- mongoLogId(1_000_000_027),
559
- 'snippets',
560
- 'Fetching snippet index done'
561
- );
562
- });
563
-
564
- bus.on(
565
- 'mongosh-snippets:package-json-edit-error',
566
- function (ev: SnippetsErrorEvent) {
567
- log.info(
568
- 'MONGOSH-SNIPPETS',
569
- mongoLogId(1_000_000_028),
570
- 'snippets',
571
- 'Modifying snippets package.json failed',
572
- ev
573
- );
574
- }
575
- );
576
-
577
- bus.on('mongosh-snippets:spawn-child', function (ev: SnippetsRunNpmEvent) {
578
- log.info(
579
- 'MONGOSH-SNIPPETS',
580
- mongoLogId(1_000_000_029),
581
- 'snippets',
582
- 'Spawning helper',
583
- ev
584
- );
585
- });
586
-
587
- bus.on(
588
- 'mongosh-snippets:load-snippet',
589
- function (ev: SnippetsLoadSnippetEvent) {
590
- log.info(
591
- 'MONGOSH-SNIPPETS',
592
- mongoLogId(1_000_000_030),
593
- 'snippets',
594
- 'Loading snippet',
595
- ev
596
- );
597
- }
598
- );
599
-
600
- bus.on(
601
- 'mongosh-snippets:snippet-command',
602
- function (ev: SnippetsCommandEvent) {
603
- log.info(
604
- 'MONGOSH-SNIPPETS',
605
- mongoLogId(1_000_000_031),
606
- 'snippets',
607
- 'Running snippet command',
608
- ev
609
- );
610
-
611
- if (ev.args[0] === 'install') {
612
- analytics.track({
613
- ...getTelemetryUserIdentity(),
614
- event: 'Snippet Install',
615
- properties: {
616
- ...trackProperties,
617
- },
618
- });
619
- }
620
- }
621
- );
622
-
623
- bus.on(
624
- 'mongosh-snippets:transform-error',
625
- function (ev: SnippetsTransformErrorEvent) {
626
- log.info(
627
- 'MONGOSH-SNIPPETS',
628
- mongoLogId(1_000_000_032),
629
- 'snippets',
630
- 'Rewrote error message',
631
- ev
632
- );
633
- }
634
- );
635
-
636
- const deprecatedApiCalls = new MultiSet<Pick<ApiEvent, 'class' | 'method'>>();
637
- const apiCalls = new MultiSet<Pick<ApiEvent, 'class' | 'method'>>();
638
- let apiCallTrackingEnabled = false;
639
- bus.on('mongosh:api-call', function (ev: ApiEvent) {
640
- // Only track if we have previously seen a mongosh:evaluate-started call
641
- if (!apiCallTrackingEnabled) return;
642
- if (ev.deprecated) {
643
- deprecatedApiCalls.add({ class: ev.class, method: ev.method });
644
- }
645
- if (ev.callDepth === 0 && ev.isAsync) {
646
- apiCalls.add({ class: ev.class, method: ev.method });
647
- }
648
- });
649
- bus.on('mongosh:evaluate-started', function () {
650
- apiCallTrackingEnabled = true;
651
- // Clear API calls before evaluation starts. This is important because
652
- // some API calls are also emitted by mongosh CLI repl internals,
653
- // but we only care about those emitted from user code (i.e. during
654
- // evaluation).
655
- deprecatedApiCalls.clear();
656
- apiCalls.clear();
657
- });
658
- bus.on('mongosh:evaluate-finished', function () {
659
- for (const [entry] of deprecatedApiCalls) {
660
- log.warn(
661
- 'MONGOSH',
662
- mongoLogId(1_000_000_033),
663
- 'shell-api',
664
- 'Deprecated API call',
665
- entry
666
- );
667
-
668
- analytics.track({
669
- ...getTelemetryUserIdentity(),
670
- event: 'Deprecated Method',
671
- properties: {
672
- ...trackProperties,
673
- ...entry,
674
- },
675
- });
676
- }
677
- for (const [entry, count] of apiCalls) {
678
- analytics.track({
679
- ...getTelemetryUserIdentity(),
680
- event: 'API Call',
681
- properties: {
682
- ...trackProperties,
683
- ...entry,
684
- count,
685
- },
686
- });
687
- }
688
- deprecatedApiCalls.clear();
689
- apiCalls.clear();
690
- apiCallTrackingEnabled = false;
691
- });
692
-
693
- // Log ids 1_000_000_034 through 1_000_000_042 are reserved for the
694
- // devtools-connect package which was split out from mongosh.
695
- // 'mongodb' is not supported in startup snapshots yet.
696
- // eslint-disable-next-line @typescript-eslint/no-var-requires
697
- hookLogger(bus, log, 'mongosh', redactURICredentials);
698
-
699
- bus.on('mongosh-sp:reset-connection-options', function () {
700
- log.info(
701
- 'MONGOSH-SP',
702
- mongoLogId(1_000_000_040),
703
- 'connect',
704
- 'Reconnect because of changed connection options'
705
- );
706
- });
707
-
708
- bus.on(
709
- 'mongosh-editor:run-edit-command',
710
- function (ev: EditorRunEditCommandEvent) {
711
- log.error(
712
- 'MONGOSH-EDITOR',
713
- mongoLogId(1_000_000_047),
714
- 'editor',
715
- 'Open external editor',
716
- redactInfo(ev)
717
- );
718
- }
719
- );
720
-
721
- bus.on(
722
- 'mongosh-editor:read-vscode-extensions-done',
723
- function (ev: EditorReadVscodeExtensionsDoneEvent) {
724
- log.error(
725
- 'MONGOSH-EDITOR',
726
- mongoLogId(1_000_000_043),
727
- 'editor',
728
- 'Reading vscode extensions from file system succeeded',
729
- ev
730
- );
731
- }
732
- );
733
-
734
- bus.on(
735
- 'mongosh-editor:read-vscode-extensions-failed',
736
- function (ev: EditorReadVscodeExtensionsFailedEvent) {
737
- log.error(
738
- 'MONGOSH-EDITOR',
739
- mongoLogId(1_000_000_044),
740
- 'editor',
741
- 'Reading vscode extensions from file system failed',
742
- {
743
- ...ev,
744
- error: ev.error.message,
745
- }
746
- );
747
- }
748
- );
749
-
750
- bus.on(
751
- 'mongosh:fetching-update-metadata',
752
- function (ev: FetchingUpdateMetadataEvent) {
753
- log.info(
754
- 'MONGOSH',
755
- mongoLogId(1_000_000_052),
756
- 'startup',
757
- 'Fetching update metadata',
758
- {
759
- ...ev,
760
- }
761
- );
762
- }
763
- );
764
-
765
- bus.on(
766
- 'mongosh:fetching-update-metadata-complete',
767
- function (ev: FetchingUpdateMetadataCompleteEvent) {
768
- log.info(
769
- 'MONGOSH',
770
- mongoLogId(1_000_000_053),
771
- 'startup',
772
- 'Fetching update metadata complete',
773
- {
774
- ...ev,
775
- }
776
- );
777
- }
778
- );
779
-
780
- // NB: mongoLogId(1_000_000_045) is used in cli-repl itself
781
- // NB: mongoLogId(1_000_000_034) through mongoLogId(1_000_000_042) are used in devtools-connect
782
- // NB: mongoLogId(1_000_000_049) is used in devtools-connect
783
- }