[COMPASS-5028] Create the Compass/mongosh common logging library Created: 25/Aug/21  Updated: 29/Oct/23  Resolved: 03/Sep/21

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: 1.29.4

Type: Task Priority: Major - P3
Reporter: Anna Henningsen Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-5031 Create compass-logging helper package... Closed
Epic Link: COMPASS-4361
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Kampala

 Description   

We have already modified mongosh to use the logv2 format. We split out the parts of mongosh that support this feature (MongoLogManager, MongoLogWriter etc.) into a separate repository and npm package, and then make mongosh use that new package.

We add a boolean gzip flag to the MongoLogManager options, which enables gzip compression when writing to the output files.

Additionally, we make the target stream underlying a MongoLogWriter publicly accessible through a getter, and we add a MongoLogWriter.bindComponent(component) helper which creates an object with info, warn, error, fatal methods that behave like the corresponding ones on MongoLogWriter, except with the component fixed to the indicated value. This helper object has a .unbound property that points to the original MongoLogWriter.



 Comments   
Comment by Githook User [ 03/Sep/21 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(cli-repl): split out log writer into separate package COMPASS-5028 (#1087)
Branch: main
https://github.com/mongodb-js/mongosh/commit/daa9194692c39d03b5e606ae55edeff953e22d5d

Comment by Githook User [ 02/Sep/21 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(cli-repl): split out log writer into separate package COMPASS-5028
Branch: 5028-dev
https://github.com/mongodb-js/mongosh/commit/29aedf2d4c9778147d608e04b6c0a1510a276754

Generated at Wed Feb 07 22:38:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.