You are here: Part 2: Core Concepts > Working with DDS Domains > DomainParticipantFactory QosPolicies > LOGGING QosPolicy (DDS Extension)

LOGGING QosPolicy (DDS Extension)

This QosPolicy configures the properties associated with the Connext DDS logging facility.

This QosPolicy includes the members in . For defaults and valid ranges, please refer to the API Reference HTML documentation.

See also: Controlling Messages from Connext DDS and Configuring Logging via XML.

DDS_LoggingQosPolicy

Type

Field Name

Description

NDDS_ConfigLogVerbosity

verbosity

Specifies the verbosity at which Connext DDS diagnostic information will be logged.

NDDS_Config_LogCategory

category

Specifies the category for which logging needs to be enabled.

NDDS_Config_LogPrintFormat

print_format

Specifies the format to be used to output the Connext DDS diagnostic information.

char *

output_file

Specifies the file to which the logged output is redirected.

Example

DSDomainParticipantFactory *factory = 
DDSDomainParticipantFactory::get_instance(); DDS_DomainParticipantFactoryQos factoryQos; DDS_ReturnCode_t retcode = factory->get_qos(factoryQos); if (retcode != DDS_RETCODE_OK) { // error } factoryQos.logging.output_file = DDS_String_dup(“myOutput.txt”); factoryQos.logging.verbosity = NDDS_CONFIG_LOG_VERBOSITY_STATUS_LOCAL; factory->set_qos(factoryQos);

Properties

This QosPolicy can be changed at any time.

Since it is only configuring logging, there are no compatibility restrictions for how it is set on the publishing and subscribing sides.

Related QosPolicies

Applicable DDS Entities

System Resource Considerations

Because the output_file will be freed by Connext DDS, you should use DDS_String_dup() to allocate the string.when providing an output_file.

© 2016 RTI