A Message Logger Factory creates message loggers. A message logger is a helper for logging the message traffic of a target.

Get a message logger factory

The factory is fetched as a singleton from the service registry:

final IMessageLoggerFactory mlf = CServiceRegistry.getInstance()

As always, make sure that the service starter of your package has a dependency on the IMessageLoggerFactory to ensure that the factory already exists.

Creating a message logger

The Message Logger Factory has a single method for generating message loggers.

@NotNull IMessageLogger createLogger(@NotNull Object aOwnerOrLogger);

The argument can be either a logger or the owner object. In this case, a logger is created for the owner object. - Innovative Distributed System