Version 10.0.2
Verbose messaging

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.

Verbosity Levels

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:

LevelValueDescription
ERROR -3Critical error conditions triggered in WiredTiger. Usually requiring a DB restart.
WARNING -2Warning conditions potentially signaling non-imminent errors and behaviors. Important to be aware of and useful for diagnosing potential error states.
NOTICE -1Messages 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 0Informational style messages, usually describing statuses and actions performed by WiredTiger.
DEBUG 1Low severity messages, useful for debugging purposes.

Verbosity Categories

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.

Configuring Verbose Categories

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:

error_check(wiredtiger_open(
home, (WT_EVENT_HANDLER *)&event_handler, "create,verbose=[api:1,version,write:0]", &conn));

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.

WT_EVENT_HANDLER
The interface implemented by applications to handle error, informational and progress messages.
Definition: wiredtiger.in:3247
wiredtiger_open
int wiredtiger_open(const char *home, WT_EVENT_HANDLER *event_handler, const char *config, WT_CONNECTION **connectionp)
Open a connection to a database.