You can control the amount of information in each message with the set_print_format() operation. The format options are listed in Message Formats.
Message 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.”
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 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().
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.
Dxxyy
In this case, xx = participant ID, yy = domain #. For example, D0149 means “domain 49, participant 01.”
Entity context
Operation on an entity will specify the object and a numeric ID, such as Writer(001A1). The name will be one of the following:
String |
Object Type |
---|---|
Participant |
DDS_DomainParticipant |
Pub |
DDS_Publisher |
Sub |
DDS_Subscriber |
Topic |
DDS_Topic |
Writer |
DDS_<*>DataWriter |
Reader |
DDS_<*>DataReader |
Topic Context
T=Hello refers to topic "Hello."
The operations which report context include:
String |
Operation |
Entity operations: |
|
ENABLE |
Entity::enable |
GET_QOS |
Entity::get_qos |
SET_QOS |
Entity::set_qos |
GET_LISTENER |
Entity::get_listener |
SET_LISTENER |
Entity::set_listener |
Factory operations (DP Factory, Participant, Pub/Sub): |
|
CREATE <Entity> |
Factory::create_<entity> |
DELETE <Entity> |
Factory::delete_<entity> |
GET_DEFAULT_QOS <Entity> |
Factory::get_default_<entity>_qos |
SET_DEFAULT_QOS <Entity> |
Factory::set_default_<entity>_qos |
Participant-specific operations: |
|
GET_PUBS |
Participant::get_publishers |
GET_SUBS |
Participant::get_subscribers |
LOOKUP Topic(<name>) |
Participant::lookup_topicdescription |
LOOKUP FlowController(<name>) |
Participant::lookup_flowcontroller |
IGNORE <Entity>(<host ID>) |
Participant::ignore_<entity> |
© 2017 RTI