.. include:: ../../03-exports/aliases.include .. include:: ../../03-exports/aliases-api.include .. include:: ../../03-exports/roles.include .. _logprofiles: Log profiles ------------ *eProsima Fast DDS* allows for registering and configuring :ref:`Log consumers ` 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 ```` XML tags. The ```` element has two child elements: ```` and ````. These are described in the following table. .. list-table:: :header-rows: 1 :align: left * - Name - Description - Values - Default * - ```` - If set to ``FALSE``, a call to |Log::ClearConsumers-api| is |br| |Log::ClearConsumers-api| is |br| performed. See :ref:`dds_layer_log_register_consumers`. - ``bool`` - ``true`` * - ```` - Defines the class and configuration of the consumer to |br| be registered. Multiple consumers can be registered |br| this way. See :ref:`dds_layer_log_consumer`. - :ref:`xmllogconsumer` - * - ```` - |ThreadSettings| for the logging thread. - |ThreadSettings| - 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-53, 55 .. _xmllogconsumer: ConsumerDataType ^^^^^^^^^^^^^^^^ +-------------------+--------------------------------------------------------------------------+-----------------------+ | Name | Description | Values | +===================+==========================================================================+=======================+ | ```` | The class of the consumer. | ``StdoutConsumer`` | | | +-----------------------+ | | | ``StdoutErrConsumer`` | | | +-----------------------+ | | | ``FileConsumer`` | +-------------------+--------------------------------------------------------------------------+-----------------------+ | ```` | This element is used to configure the log consumer and only applies |br| | :ref:`xmllogprop` | | | if ```` is set to ``StdoutErrConsumer`` or ``FileConsumer``. | | +-------------------+--------------------------------------------------------------------------+-----------------------+ .. _xmllogprop: PropertyType ^^^^^^^^^^^^ +-------------+----------------------------------------------------------+----------------------+----------------------+ | Name | Description | Values | Default | +=============+==========================================================+======================+======================+ | ```` | Name of the property to be configured. | ``filename`` | | | | +----------------------+----------------------+ | | | ``append`` | | | | +----------------------+----------------------+ | | | ``stderr_threshold`` | | +-------------+----------------------------------------------------------+----------------------+----------------------+ | ```` | The value of the property. | | | | +----------------------------------------------------------+----------------------+----------------------+ | | * If ```` is set to ``filename``, then this |br| | ``string`` | `output.log` | | | element contains the name of the log file. This |br| | | | | | property only applies if ```` is set to |br| | | | | | ``FileConsumer`` | | | | +----------------------------------------------------------+----------------------+----------------------+ | | * If ```` is set to ``append``, then this |br| | ``Boolean`` | ``false`` | | | element defines whether the consumer should, upon |br| | | | | | creation, open the file for appending or |br| | | | | | overriding. This property only applies if |br| | | | | | ```` is set to ``FileConsumer`` | | | | +----------------------------------------------------------+----------------------+----------------------+ | | * If ```` is set to ``stderr_threshold``, then |br|| ``Log::Kind`` |``Log::Kind::Warning``| | | this element defines the threshold used by the |br| | | | | | :ref:`Log consumers `. |br| | | | | | This property only applies if ```` is set |br| | | | | | to ``StdoutErrConsumer`` | | | +-------------+----------------------------------------------------------+----------------------+----------------------+