eProsima Fast DDS allows for registering and configuring :ref:`Log consumers <dds_layer_log_consumer>` using XML
configuration files.
Please refer to :ref:`dds_layer_log_intro` 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.
The following constitutes an example of an XML configuration file that sets the |Log-api| to use one
|StdoutConsumer-api|, one |StdoutErrConsumer-api|, and one |FileConsumer-api|:
.. literalinclude:: /../code/XMLTester.xml
:language: xml
:start-after: <!-->LOG-CONFIG<-->
:end-before: <!--><-->
:lines: 2-3, 5-43, 45
Name |
Description |
Values |
<class> |
The class of the consumer. |
StdoutConsumer |
StdoutErrConsumer |
FileConsumer |
<property> |
This element is used to configure the log consumer and only applies |br|
if <class> is set to StdoutErrConsumer or FileConsumer . |
:ref:`xmllogprop` |
Name |
Description |
Values |
Default |
<name> |
Name of the property to be configured. |
filename |
|
append |
|
stderr_threshold |
|
<value> |
The value of the property. |
|
|
- If
<name> is set to filename , then this |br|
element contains the name of the log file. This |br|
property only applies if <class> is set to |br|
FileConsumer
|
string |
output.log |
- If
<name> is set to append , then this |br|
element defines whether the consumer should, upon |br|
creation, open the file for appending or |br|
overriding. This property only applies if |br|
<class> is set to FileConsumer
|
Boolean |
false |
|
Log::Kind |
Log::Kind::Warning |