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

Extend the verbose API to support the assignment of verbosity levels per event category

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.2.0, 5.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • 8
    • Storage - Ra 2021-10-18, Storage - Ra 2021-11-01

      The 'verbose' configuration string (used when configuring a WiredTiger connection) currently only supports passing a list of event categories to indicate what verbose messages should be enabled. We want to optionally provide the ability to associate a verbosity level to any event category defined under the  'verbose' configuration. 

      For example, the new verbose severity levels can be passed as:  

      verbose = [checkpoint:1,rts:0,api]

      To avoid introducing breaking changes to current uses of the verbose configuration API, when a verbose event is passed without a verbosity level, we will interpret the verbosity levels of the given event to be 'DEBUG(1)' i.e. 'api' in the above example.

      Definition of Done:

      • Added definitions for the new verbosity levels: DEBUG (1), INFO (0), WARNING (-1), ERROR (-2).
      • Extend parsing of the 'verbose' configuration to additionally read severity levels. Implementation includes:
        • Creating a means to internally store/manage the verbosity levels for each event - refactoring the current flag-based mechanism.
        • Defaulting event categories not listed in the verbose configuration string to the INFO(0) verbosity level.
        • Bounding externally configurable verbose levels to DEBUG(1) and INFO(0) (we don't want to suppress WARNING(-1) & ERROR(-2) messages since they would contain important diagnostic information).
      • Update the implementation of '_wt_verbose' (being our current internal verbose message method), to recognize the above changes and display the message if the associated events verbosity level is less than or equal to the 'DEBUG' verbosity level.

        1. bit_scan_approach.diff
          32 kB
          Alison Felizzi
        2. enum_approach.diff
          11 kB
          Alison Felizzi

            Assignee:
            alison.felizzi@mongodb.com Alison Felizzi (Inactive)
            Reporter:
            alison.felizzi@mongodb.com Alison Felizzi (Inactive)
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: