Log configuration method for Cyclone DDS

We have two ways to Set environment variables before running the program.

  1. XML configuration file: The configuration parameters of Cyclone DDS are defined using an XML file. You can create a custom XML configuration file and specify the location of the configuration file by setting the CYCLONEDDS_URI environment variable.
  • Linux: export CYCLONEDDS_URI=file://$HOME/path/to/dds/configuration.xml
  1. Direct setting of environment variables: You can also directly set the XML configuration to the CYCLONEDDS_URI environment variable without using external files. For example:
  • Linux: export CYCLONEDDS_URI="<CycloneDDS><Domain><General><NetworkInterfaceAddress>127.0.0.1</NetworkInterfaceAddress></General></Domain></CycloneDDS>"

After setting the environment variables, you can verify whether the variables have been set correctly by using the echo $CYCLONEDS_URI command. If everything is normal, the terminal will output the XML configuration you have set.

Please note that the environment variables set using the export command are only valid in the current terminal session. If you open a new terminal window, these variables will not be retained. If you want these variables to be available in all new terminal sessions, you need to add these export commands to your~/. bashrc or~/. profile files.

The logging function of Cyclone DDS: 

Configure Tracing and Verbosity:

Tracing and Verbosity: Cyclone DDS can generate detailed tracking information, including all traffic and internal activities. You can set different tracking levels, for example:

Reporting and tracing — Eclipse Cyclone DDS, 0.11.0

Using Tracing and Verbosity:

According to the set Verbosity level, Cyclone DDS will generate logs with different levels of detail.

For example,

<Tracing>
<Verbosity> finest</Verbosity>
<OutputFile>
        ${HOME}/work_space/log/cyclonedds.log.${CYCLONEDDS_PID}
</OutputFile>
<AppendToFile>true</AppendToFile>

<EnableCategory>fatal,error,config,info</EnableCategory>
</Tracing>

  • In Cyclone DDS, you can set Tracing and Verbosity through an XML configuration file. You need to
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

aFakeProgramer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值