RTI Connext Modern C++ API Version 7.3.0
rti::core::MonitoringLoggingDistributionSettings Class Reference

<<extension>> Configures the distribution of log messages. More...

#include <rti/core/PolicySettings.hpp>

Public Member Functions

 MonitoringLoggingDistributionSettings ()
 Creates an instance with the default settings. More...
 
MonitoringLoggingDistributionSettingsconcurrency_level (uint32_t the_concurrency_level)
 Defines how concurrent the push of log messages to RTI Monitoring Library 2.0 is. More...
 
uint32_t concurrency_level () const
 Getter (see setter with the same name). More...
 
MonitoringLoggingDistributionSettingsmax_historical_logs (uint32_t the_max_historical_logs)
 The number of log messages that RTI Monitoring Library 2.0 will keep as history. More...
 
uint32_t max_historical_logs () const
 Getter (see setter with the same name). More...
 
MonitoringLoggingDistributionSettingsdatawriter_qos_profile_name (const rti::core::optional_value< std::string > &the_datawriter_qos_profile_name)
 Sets The fully qualified name of the profile used to configure the dds::pub::DataWriter that distributes log messages. More...
 
MonitoringLoggingDistributionSettingsdatawriter_qos_profile_name (const char *the_datawriter_qos_profile_name)
 Sets The fully qualified name of the profile used to configure the dds::pub::DataWriter that distributes log messages. More...
 
rti::core::optional_value< std::string > datawriter_qos_profile_name () const
 Getter (see setter with the same name). More...
 
MonitoringLoggingDistributionSettingsthread (const rti::core::ThreadSettings &the_thread)
 The settings of the logging thread. More...
 
const rti::core::ThreadSettingsthread () const
 Getter (see setter with the same name). More...
 
rti::core::ThreadSettingsthread ()
 Getter (see setter with the same name). More...
 
MonitoringLoggingDistributionSettingspublication_period (const dds::core::Duration &the_publication_period)
 Period at which the logging thread publishes log messages. More...
 
dds::core::Duration publication_period () const
 Getter (see setter with the same name) More...
 

Detailed Description

<<extension>> Configures the distribution of log messages.

Log messages are pushed into RTI Monitoring Library 2.0 and published by the logging thread.

The logging thread only publishes a log message with a Syslog level smaller than or equal to the forwarding level of the rti::config::LogFacility associated with the log message.

The default value of the forwarding level for all facilities is rti::config::SyslogVerbosity::warning. This value can be changed with the rti::core::MonitoringTelemetryData::logs QoS Policy or by sending a command to RTI Monitoring Library 2.0.

In this release, commands can only be sent from the RTI Observability Dashboards.

RTI Monitoring Library 2.0 can be configured to keep a history of log messages for later distribution when a log snapshot is requested by a RTI Observability Collector Service.

The log messages maintained in the history are the last 'n' messages published by the logging thread (where 'n' is the value of rti::core::MonitoringLoggingDistributionSettings::max_historical_logs).

Constructor & Destructor Documentation

◆ MonitoringLoggingDistributionSettings()

rti::core::MonitoringLoggingDistributionSettings::MonitoringLoggingDistributionSettings ( )
inline

Creates an instance with the default settings.

Member Function Documentation

◆ concurrency_level() [1/2]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::concurrency_level ( uint32_t  the_concurrency_level)

Defines how concurrent the push of log messages to RTI Monitoring Library 2.0 is.

With a concurrency_level of one, all the log messages pushed to RTI Monitoring Library 2.0 will be stored into a single queue protected by a single mutex.

With a concurrency_level of 'n', RTI Monitoring Library 2.0 will create 'n' queues for log messages, each queue protected by its own mutex.

The log messages generated by a single thread will always be pushed to the same queue. The log messages for two threads associated with different log queues can be pushed in parallel. This is why a higher concurrency_level provides more concurrency.

The log messages added to the log queues are processed and published by a single thread configured using rti::core::MonitoringLoggingDistributionSettings::thread.

[default] 5

[range] [1, 100]

◆ concurrency_level() [2/2]

uint32_t rti::core::MonitoringLoggingDistributionSettings::concurrency_level ( ) const

Getter (see setter with the same name).

◆ max_historical_logs() [1/2]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::max_historical_logs ( uint32_t  the_max_historical_logs)

The number of log messages that RTI Monitoring Library 2.0 will keep as history.

RTI Monitoring Library 2.0 will keep as history the last max_historical_logs published messages.

A value of 0 means that RTI Monitoring Library 2.0 should not keep any history.

[default] 128

◆ max_historical_logs() [2/2]

uint32_t rti::core::MonitoringLoggingDistributionSettings::max_historical_logs ( ) const

Getter (see setter with the same name).

◆ datawriter_qos_profile_name() [1/3]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::datawriter_qos_profile_name ( const rti::core::optional_value< std::string > &  the_datawriter_qos_profile_name)

Sets The fully qualified name of the profile used to configure the dds::pub::DataWriter that distributes log messages.

Parameters
the_datawriter_qos_profile_nameAn optional string. An unset value indicates that the RTI Monitoring Library 2.0 uses rti::core::builtin_profiles::qos_lib::generic_monitoring2().

[default] Unset

The dds::pub::DataWriter Topic is MONITORING_LOGGING_TOPIC_NAME.

If null (the default value), then RTI Monitoring Library 2.0 uses rti::core::builtin_profiles::qos_lib::generic_monitoring2().

[default] null

◆ datawriter_qos_profile_name() [2/3]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::datawriter_qos_profile_name ( const char *  the_datawriter_qos_profile_name)

Sets The fully qualified name of the profile used to configure the dds::pub::DataWriter that distributes log messages.

Parameters
the_datawriter_qos_profile_nameThe profile name. Cannot be NULL.

The dds::pub::DataWriter Topic is MONITORING_LOGGING_TOPIC_NAME.

If null (the default value), then RTI Monitoring Library 2.0 uses rti::core::builtin_profiles::qos_lib::generic_monitoring2().

[default] null

◆ datawriter_qos_profile_name() [3/3]

rti::core::optional_value< std::string > rti::core::MonitoringLoggingDistributionSettings::datawriter_qos_profile_name ( ) const

Getter (see setter with the same name).

◆ thread() [1/3]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::thread ( const rti::core::ThreadSettings the_thread)

The settings of the logging thread.

The logging thread periodically publishes the log messages pushed into RTI Monitoring Library 2.0 log message queues after they are generated.

The thread runs at the period configured using rti::core::MonitoringLoggingDistributionSettings::publication_period.

[default] DDS_THREAD_SETTINGS_DEFAULT

◆ thread() [2/3]

const rti::core::ThreadSettings & rti::core::MonitoringLoggingDistributionSettings::thread ( ) const

Getter (see setter with the same name).

◆ thread() [3/3]

rti::core::ThreadSettings & rti::core::MonitoringLoggingDistributionSettings::thread ( )

Getter (see setter with the same name).

◆ publication_period() [1/2]

MonitoringLoggingDistributionSettings & rti::core::MonitoringLoggingDistributionSettings::publication_period ( const dds::core::Duration the_publication_period)

Period at which the logging thread publishes log messages.

With a period of 0 seconds, log messages will be published immediately after they are pushed into RTI Monitoring Library 2.0.

[default] 1 second

◆ publication_period() [2/2]

dds::core::Duration rti::core::MonitoringLoggingDistributionSettings::publication_period ( ) const

Getter (see setter with the same name)