CoreDX_LoggingQoSPolicy

Dear all,

where is possible to get some more information how to use CoreDX_LoggingQoSPolicy ?
I tried to set this QoS like:
part_qos.logging.flags = 10;
strcpy(part_qos.logging.uri, "stdout");
on publisher and datawriter, but I could get more log information.

Regards
Bogdan

Comments

Re: CoreDX_LoggingQoSPolicy

Bogdan,
The logging flags (specified in the dds.h header file) can be used to control the generation of different categories of logging messages. The value '10' from your example would select 'FACTORY' and 'DATA' logging messages. For reference, here is the full set of flags:

#define COREDX_ERROR_LOGGING_QOS 0x0001
#define COREDX_DATA_LOGGING_QOS 0x0002
#define COREDX_DISCOVERY_LOGGING_QOS 0x0004
#define COREDX_FACTORY_LOGGING_QOS 0x0008
#define COREDX_LIVELINESS_LOGGING_QOS 0x0010
#define COREDX_STATUS_LOGGING_QOS 0x0020
#define COREDX_TRACE_LOGGING_QOS 0x8000

In order to see logging messages (beyond the 'ERROR' level), it is necessary to link with the "_log" versions of the CoreDX DDS libraries. For example, link with libdds_log.a instead of libdds.a, [or libdds_log.so instead of libdds.so].

You should also note that the logging libraries incur additional overhead at runtime, and will not provide the same performance as the normal libraries. Because of this, it is recommended that logging libraries are used only during development.

Further note that the 'logging.uri' parameter is not fully supported. Logging output will always be directed to stderr (or via logact on Android).

Regards,
--clark