Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-7805

Update the cppsuite logging code to use function calls wrapped in macros.

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • 5

      In order to avoid unnecessary string allocations when we call log_msg() with trace_type greater than _trace_level we should use macros that will check log level before calling the log method. It can look similar to this:  

      #define LOG(lvl, msg) \
      do { \
          if (_trace_level >= lvl) \
              log_msg(lvl, msg); \
      } while (0)

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: