You are here: Part 3: Advanced Concepts > Troubleshooting > Controlling Messages from Connext DDS > Format of Logged Messages

Format of Logged Messages

You can control the amount of information in each message with the set_print_format() operation. The format options are listed in Table 5 .

Table 5 Message Formats

Message Format
(NDDS_CONFIG_LOG_
PRINT_FORMAT_*)

Description

DEFAULT

Message, method name, and activity context.

TIMESTAMPED

Message, method name, activity context, and timestamp.

VERBOSE

Message with all available context information (includes thread identifier, activity context).

VERBOSE_TIMESTAMPED

Message with all available context information and timestamp.

DEBUG

Information for internal debugging by RTI personnel.

MINIMAL

Message number, method name.

MAXIMAL

All available fields.

Of course, you are not likely to recognize all of the method names; many of the operations that perform logging are deep within the implementation of Connext DDS. However, in case of errors, logging will typically take place at several points within the call stack; the output thus implies the stack trace at the time the error occurred. You may only recognize the name of the operation that was the last to log its message (i.e., the function that called all the others); however, the entire stack trace is extremely useful to RTI support personnel in the event that you require assistance.

You may notice that many of the logged messages begin with an exclamation point character. This convention indicates an error and is intended to be reminiscent of the negation operator in many programming languages. For example, the message “!create socket”in the second line of the above stack trace means “cannot create socket.”

Timestamps

Reported times are in seconds from a system-dependent starting time; these are equivalent to the output format from Connext DDS. The timestamp is in the form "ssssss.mmmmmm" where <ssssss> is a number of seconds, and <mmmmm> is a fraction of a second expressed in microseconds. Enabling timestamps will result in some additional overhead for clock access for every message that is logged.

Logging of timestamps is not enabled by default. To enable it, use NDDS_Config_Logger method set_print_format().

Thread identification

Thread identification strings uniquely identify for active thread when a message is output to the console. A thread may be a user (application) thread or one of several types of internal threads. The possible thread types are:

user thread: U<threadID>

receive thread: rR<thread index><domain ID><app ID>, where thread index is an integer identifying this receive thread

event thread: revt<domain ID><app ID>

asynchronous publisher thread: rDsp

Logging of thread IDs are not enabled by default. To enable it, use NDDS_Config_Logger method set_print_format().

Hierarchical Context

Many middleware APIs now store information in thread-specific storage about the current operation, as well as information about which DDS domain (and participant ID) was active, and which entities were being operated on. In the case of objects that are associated with topics, the topic name is also stored.

The context field is output by default.

Explanation of Context Strings

© 2015 RTI