code: public LoggingEvent rewrite(final LoggingEvent source) {
          if (!properties.isEmpty()) {
              Map rewriteProps = new HashMap(source.getProperties());
              for(Iterator iter = properties.entrySet().iterator();
                      iter.hasNext();
                      ) {
                  Map.Entry entry = (Map.Entry) iter.next();
                  if (!rewriteProps.containsKey(entry.getKey())) {
                      rewriteProps.put(entry.getKey(), entry.getValue());
                  }
              }
  
              return new LoggingEvent(
                      source.getFQNOfLoggerClass(),
                      source.getLogger() != null ? source.getLogger(): Logger.getLogger(source.getLoggerName()), 
                      source.getTimeStamp(),
                      source.getLevel(),
                      source.getMessage(),
                      source.getThreadName(),
                      source.getThrowableInformation(),
                      source.getNDC(),
                      source.getLocationInformation(),
                      rewriteProps);
          }
          return source;
      }
docs: {@inheritDoc}