"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AppenderSet.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

AppenderSet.java  (apache-log4j-2.11.1-src):AppenderSet.java  (apache-log4j-2.11.2-src)
skipping to change at line 117 skipping to change at line 117
@PluginBuilderFactory @PluginBuilderFactory
public static Builder newBuilder() { public static Builder newBuilder() {
return new Builder(); return new Builder();
} }
private AppenderSet(final Configuration configuration, final Map<String, Nod e> appenders) { private AppenderSet(final Configuration configuration, final Map<String, Nod e> appenders) {
this.configuration = configuration; this.configuration = configuration;
this.nodeMap = appenders; this.nodeMap = appenders;
} }
public Appender createAppender(final String appenderName, final String actua public Appender createAppender(final String actualAppenderName, final String
lName) { sourceAppenderName) {
final Node node = nodeMap.get(appenderName); final Node node = nodeMap.get(actualAppenderName);
if (node == null) { if (node == null) {
LOGGER.error("No node named {} in {}", appenderName, this); LOGGER.error("No node named {} in {}", actualAppenderName, this);
return null; return null;
} }
node.getAttributes().put("name", actualName); node.getAttributes().put("name", sourceAppenderName);
if (node.getType().getElementName().equals(Appender.ELEMENT_TYPE)) { if (node.getType().getElementName().equals(Appender.ELEMENT_TYPE)) {
final Node appNode = new Node(node); final Node appNode = new Node(node);
configuration.createConfiguration(appNode, null); configuration.createConfiguration(appNode, null);
if (appNode.getObject() instanceof Appender) { if (appNode.getObject() instanceof Appender) {
final Appender app = appNode.getObject(); final Appender app = appNode.getObject();
app.start(); app.start();
return app; return app;
} }
LOGGER.error("Unable to create Appender of type " + node.getName()); LOGGER.error("Unable to create Appender of type " + node.getName());
return null; return null;
} }
LOGGER.error("No Appender was configured for name {} " + appenderName); LOGGER.error("No Appender was configured for name {} " + actualAppenderN ame);
return null; return null;
} }
} }
 End of changes. 4 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)