As part of normal operation, WiredTiger will produce verbose messages around various events, actions and possible issues/errors. Verbose messages are spread across various categories, representing different sub-systems throughout WiredTiger. Verbose messages can be usefully leveraged to monitor, debug and diagnose events across WiredTiger's runtime.
WiredTiger associates a verbosity level with each message. The verbosity level denotes the severity of a given message, ranging from high severity error messages (ERROR
) to low severity debug informational messages (DEBUG
). The full range of verbosity levels and their associated meanings are:
Level | Value | Description |
---|---|---|
ERROR | -3 | Critical error conditions triggered in WiredTiger. Usually requiring a DB restart. |
WARNING | -2 | Warning conditions potentially signaling non-imminent errors and behaviors. Important to be aware of and useful for diagnosing potential error states. |
NOTICE | -1 | Messages for significant events in WiredTiger, usually worth noting. Notice messages are associated with normal runtime operations i.e not produced from any state considered harmful or error-prone. |
INFO | 0 | Informational style messages, usually describing statuses and actions performed by WiredTiger. |
DEBUG | 1 | Low severity messages, useful for debugging purposes. |
Each verbose message is associated with a category. Verbose categories represent a range of different sub-systems in WiredTiger, where messages will denote a specific operation or event under a given sub-system. To see the complete exhaustive list of available verbose categories, refer to the 'verbose'
configuration option under wiredtiger_open.
Each verbosity category can be individually configured with a verbosity level (as described in Verbosity Levels). This allowing the end user to fine tune and tailor the verbosity of each category to fit their use case e.g configuring WiredTiger's runtime for debugging/monitoring a specific sub-system.
When a category is assigned a verbosity level, any associated message less than or equal to (<=
) that level will be displayed. As an example, configuring the checkpoint
category with the DEBUG
verbosity level would display checkpoint
related messages less than or equal to the DEBUG
level. Any category that is not explicitly configured with a verbosity level will default to the NOTICE
(-1
) level, effectively masking INFO
and DEBUG
informational messages.
Configuration of the verbose messaging system is achieved via the verbose
configuration option when either opening a wiredtiger connection (wiredtiger_open) or re-configuring a wiredtiger connection (WT_CONNECTION::reconfigure). The verbose
configuration takes in a list of categories, where each category can be optionally associated with a verbosity level. An example configuring a WiredTiger connection with verbosity enabled:
In the above example:
api
is configured to the DEBUG
verbosity level.version
is configured to the DEBUG
verbosity level. If a category is passed without a verbosity level (.e.g
:0
), the category will default to the DEBUG
level (i.e verbose=[version]
is equivalent to verbose=[version:1]
).write
is configured to the INFO
verbosity level.When configuring verbosity levels, the lowest value the user can associate with a category is 0
(INFO
). This ensuring the lower verbosity levels, NOTICE
(-1
) and below, are unmasked. Messages with levels less than or equal to NOTICE
are considered to have important diagnostic information and thus should not be hidden.