Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-5028

Create the Compass/mongosh common logging library

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.29.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      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.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: