LOGGING QosPolicy (DDS Extension)

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

This QosPolicy includes the members in DDS_LoggingQosPolicy. 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 Connext DDS diagnostic information.

char *

output_file

Specifies the file to which the logged output is redirected.

char *

output_file_suffix

Sets the file suffix when logging to a set of files.

DDS_Long

max_bytes_per_file

Specifies the maximum number of bytes a single file can contain.

DDS_Long

max_files

Specifices the maximum number of files to create before overwriting the previous ones.

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.

© 2018 RTI