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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: In Code Review
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

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

          Activity

            People

            Assignee:
            alison.felizzi Alison Felizzi
            Reporter:
            alison.felizzi Alison Felizzi
            Collaborators:
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: