doSafeLog is called unnecessarily when UserAssertAfterLog is used

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • 8.3 Required
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      doSafeLog is called whenever a log statement throws an exception: https://github.com/10gen/mongo/blob/27cf80da81947b9420cd8c04ed0ed240715e688f/src/mongo/logv2/log_detail.cpp#L334

      But sometimes we intend for a log statement to throw:

      https://github.com/10gen/mongo/blob/27cf80da81947b9420cd8c04ed0ed240715e688f/src/mongo/logv2/log_options.h#L43

      Meaning that we output the chatty doSafeLog output when we really do not need to, if 
      UserAssertAfterLog is in use.

            Assignee:
            Unassigned
            Reporter:
            Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: