43.1 LOGGING QosPolicy (DDS Extension)
This QosPolicy configures the properties associated with the Connext logging facility.
This QosPolicy includes the members in Table 43.1 DDS_LoggingQosPolicy. For defaults and valid ranges, please refer to the API Reference HTML documentation.
See also: 54.2 Configuring Connext Logging and 54.3 Configuring Logging via XML.
Type |
Field Name |
Description |
NDDS_ConfigLogVerbosity |
verbosity |
Specifies the verbosity at which Connext 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 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. |
43.1.1 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);
43.1.2 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.
43.1.3 Related QosPolicies
- None
43.1.4 Applicable DDS Entities
43.1.5 System Resource Considerations
Because the output_file will be freed by Connext, you should use DDS_String_dup() to allocate the string.when providing an output_file.