Connext DDS provides several types of messages to help you debug your system and alert you to errors during run time. You can control how much information is reported and where it is logged.
How much information is logged is known as the verbosity setting. Message Logging Verbosity Levels describes the increasing verbosity levels.
Verbosity (NDDS_CONFIG_ |
Description |
No messages will be logged. (lowest verbosity) |
|
Log only high-priority error messages. An error indicates something is wrong with how Connext DDS is functioning. The most common cause of this type of error is an incorrect configuration. |
|
Additionally log warning messages. A warning indicates that Connext DDS is taking an action that may or may not be what you intended. Some configuration information is also logged at this verbosity to aid in debugging. |
|
Additionally log verbose information about the lifecycles of local Connext DDS objects. |
|
Additionally log verbose information about the lifecycles of remote Connext DDS objects. |
|
Additionally log verbose information about periodic activities and Connext DDS threads. (highest verbosity) |
Note that the verbosities are cumulative: logging at a high verbosity means also logging all lower verbosity messages. If you change nothing, the default verbosity will be set to NDDS_CONFIG_LOG_VERBOSITY_ERROR.
Logging at high verbosities can be detrimental to your application's performance. You should generally not set the verbosity above NDDS_CONFIG_LOG_VERBOSITY_WARNING, unless you are debugging a specific problem.
You will typically change the verbosity of all of Connext DDS at once. However, in the event that such a strategy produces too much output, you can further discriminate among the messages you would like to see. The types of messages logged by Connext DDS fall into the categories listed in Message Logging Categories; each category can be set to a different verbosity level.
Description |
|
Messages about the underlying platform (hardware and OS). |
|
Messages about data serialization and deserialization and network traffic. |
|
Messages about the internal database of Connext DDS objects. |
|
Messages about local and remote entities and the discovery process. |
|
Messages about Connext DDS’s API layer (such as method argument validation). |
The methods in the NDDSConfigLogger class can be used to change verbosity settings, as well as the destination for logged messages. NDDSConfigLogger Operations lists the available operations; consult the API Reference HTML documentation for more information.
Purpose |
Operation |
Description |
Change Verbosity for all Categories |
Gets the current verbosity. If per-category verbosities are used, returns the highest verbosity of any |
|
Sets the verbosity of all categories. |
||
Change Verbosity for a Specific Category |
get_verbosity_by_category |
Gets/Sets the verbosity for a specific category. |
set_verbosity_by_category |
||
Change Destination of Logged Messages |
Returns the file to which messages are being logged, or NULL for the default destination (standard output on most platforms). |
|
Redirects future logged messages to a set of files. |
||
Returns the logging device installed with the logger. |
||
Registers a specified logging device with the logger. See Customizing the Handling of Generated Log Messages |
||
Change Message Format |
get_print_format |
Gets/Sets the current message format that Connext DDS is using to log diagnostic information. See Format of Logged Messages. |
set_print_format |
© 2018 RTI