Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-74968

Create a trait customization point for user-defined types to control stringification used for logging

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • Service Arch 2023-04-03

      We use detection idiom to force use of a toString member, a toString nonmember, etc... in some order.
      There should be a way for user-defined types to provide an explicit method of log-stringification, as toString might not be appropriate.
      It is a bad fit for DatabaseName, for example, at least during the transition to tenantId-augmented DatabaseNames.

      Requires a relatively simple extension to the detection logic in logv2/attribute_storage.h

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            mathis.bessa@mongodb.com Mathis Bessa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: