11.6. 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 |
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>
<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>
</log>
</dds>
11.6.1. ConsumerDataType¶
Name |
Description |
Values |
---|---|---|
|
The class of the consumer. |
|
|
||
|
||
|
This element is used to configure the log consumer and only applies |
11.6.2. PropertyType¶
Name |
Description |
Values |
Default |
---|---|---|---|
|
Name of the property to be configured. |
|
|
|
|||
|
|||
|
The value of the property. |
||
|
|
output.log |
|
|
|
|
|
|
|
|