10.9. Log profiles¶
eProsima Fast DDS allows for registering and configuring Log consumers using XML
configuration files.
Please refer to Logging for more information on Fast DDS extensible Logging built-in module.
The logging profiles are defined within the <log> XML tags.
The <log> element has two child elements: <use_default> and <consumer>.
These are described in the following table.
Name |
Description |
Values |
Default |
|---|---|---|---|
|
If set to |
|
|
|
Defines the class and configuration of the consumer to be registered. Multiple consumers can be registered this way. See Consumers. |
||
|
ThreadSettings for the logging thread. |
The following constitutes an example of an XML configuration file that sets the Log to use one
StdoutConsumer, one StdoutErrConsumer, and one FileConsumer:
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<log>
<!--
Clear consumers
-->
<use_default>false</use_default>
<!--
StdoutConsumer does not have any properties
-->
<consumer>
<class>StdoutConsumer</class>
</consumer>
<!--
StdoutErrConsumer with threshold set to Log::Kind::Error
-->
<consumer>
<class>StdoutErrConsumer</class>
<property>
<name>stderr_threshold</name>
<value>Log::Kind::Error</value>
</property>
</consumer>
<!--
FileConsumer openning "execution.log" in append mode
-->
<consumer>
<class>FileConsumer</class>
<property>
<name>filename</name>
<value>execution.log</value>
</property>
<property>
<name>append</name>
<value>true</value>
</property>
</consumer>
<!--
ThreadSettings for the log's consumer thread
-->
<thread_settings>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</thread_settings>
</log>
</dds>
10.9.1. ConsumerDataType¶
Name |
Description |
Values |
|---|---|---|
|
The class of the consumer. |
|
|
||
|
||
|
This element is used to configure the log consumer and only applies
if |
10.9.2. PropertyType¶
Name |
Description |
Values |
Default |
|---|---|---|---|
|
Name of the property to be configured. |
|
|
|
|||
|
|||
|
The value of the property. |
||
|
|
output.log |
|
|
|
|
|
|
|
|