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:
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.