code: public static void checkMessageFactory(final ExtendedLogger logger, final MessageFactory messageFactory) {
          final String name = logger.getName();
          final MessageFactory loggerMessageFactory = logger.getMessageFactory();
          if (messageFactory != null && !loggerMessageFactory.equals(messageFactory)) {
              StatusLogger.getLogger().warn(
                      "The Logger {} was created with the message factory {} and is now requested with the "
                              + "message factory {}, which may create log events with unexpected formatting.", name,
                      loggerMessageFactory, messageFactory);
          } else if (messageFactory == null && !loggerMessageFactory.getClass().equals(DEFAULT_MESSAGE_FACTORY_CLASS)) {
              StatusLogger
                      .getLogger()
                      .warn("The Logger {} was created with the message factory {} and is now requested with a null "
                              + "message factory (defaults to {}), which may create log events with unexpected "
                              + "formatting.",
                              name, loggerMessageFactory, DEFAULT_MESSAGE_FACTORY_CLASS.getName());
          }
      }
docs: Checks that the message factory a logger was created with is the same as the given messageFactory. If they are
  different log a warning to the {@linkplain StatusLogger}. A null MessageFactory translates to the default
  MessageFactory {@link #DEFAULT_MESSAGE_FACTORY_CLASS}.
  
  @param logger The logger to check
  @param messageFactory The message factory to check.