42. Using Distributed Logger in a Connext DDS Application

There are two ways to use Distributed Logger: directly through its API or by attaching it to an existing logging framework as an ‘appender’ or a ‘handler.’ Using the API directly is straightforward, but keep in mind that Distributed Logger is not intended to be a full-featured logging library. Rather, it is primarily intended to be integrated into third-party logging infrastructures.

The libraries that you will need for Distributed Logger are listed in 42.1 Distributed Logger Libraries.

Distributed Logger comes with third-party integrations for the open-source project log4j (http://logging.apache.org/log4j/) as well as Java’s built-in logging library (java.util.logging). Please see 42.3 Examples for examples that illustrate these integrations.

Distributed Logger captures and forwards Connext DDS internal information, warning, and error messages using a DDS topic. It monitors these messages using the same mechanism as user log messages.

These Connext DDS log messages are sent over DDS automatically as soon as you initialize Distributed Logger (by calling RTI_DL_DistLogger_getInstance() in C or C++, or Logger.getLogger(...) in Java; see the API Reference HTML documentation for details).

© 2020 RTI