Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4813 Implement the severity logging methods
  3. NODE-4815

Stringify and truncate BSON docs passed into the logger

    • Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.4.0
    • Affects Version/s: 5.0.0
    • Component/s: None
    • Labels:
    • 2
    • 0
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Description

      BSON documents that are passed into the logger are naively stringified, but they ultimately need to be truncated to MONGODB_LOG_MAX_LENGTH.

      Acceptance Criteria

      • all BSON documents within the logger should be converted to EJSON
      • EJSON'd BSON documents should truncated to match MONGODB_LOG_MAX_LENGTH
      • EJSON'd BSON documents should end in an ellipsis that doesn't count towards the max length

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            andy.mina@mongodb.com Andy Mina
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: