* @return The LogEvent after rewriting.
*/
public LogEvent rewrite(final LogEvent source) {
final Map<String, String> props = new HashMap<String, String>(source.getContextMap());
for (final Map.Entry<Property, Boolean> entry : properties.entrySet()) {
final Property prop = entry.getKey();
props.put(prop.getName(), entry.getValue() ?
config.getSubst().replace(prop.getValue()) : prop.getValue());
}
return new Log4jLogEvent(source.getLoggerName(), source.getMarker(), source.getFQCN(), source.getLevel(),
source.getMessage(), source.getThrown(), props, source.getContextStack(), source.getThreadName(),
source.getSource(), source.getMillis());