Skip to content

Commit b5d8542

Browse files
committed
Removes additional default configurations
1 parent 6d8372e commit b5d8542

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/XmlLayoutBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.apache.log4j.config.PropertiesConfiguration;
2929
import org.apache.log4j.layout.Log4j1XmlLayout;
3030
import org.apache.log4j.xml.XmlConfiguration;
31-
import org.apache.logging.log4j.core.config.DefaultConfiguration;
31+
import org.apache.logging.log4j.core.config.Configuration;
3232
import org.apache.logging.log4j.plugins.Namespace;
3333
import org.apache.logging.log4j.plugins.Plugin;
3434
import org.w3c.dom.Element;
@@ -60,17 +60,17 @@ public Layout parse(final Element layoutElement, final XmlConfiguration config)
6060
locationInfo.set(getBooleanValueAttribute(currentElement));
6161
}
6262
});
63-
return createLayout(properties.get(), locationInfo.get());
63+
return createLayout(config, properties.get(), locationInfo.get());
6464
}
6565

6666
@Override
6767
public Layout parse(final PropertiesConfiguration config) {
6868
final boolean properties = getBooleanProperty(PROPERTIES);
6969
final boolean locationInfo = getBooleanProperty(LOCATION_INFO);
70-
return createLayout(properties, locationInfo);
70+
return createLayout(config, properties, locationInfo);
7171
}
7272

73-
private Layout createLayout(final boolean properties, final boolean locationInfo) {
74-
return LayoutWrapper.adapt(Log4j1XmlLayout.createLayout(new DefaultConfiguration(), locationInfo, properties));
73+
private Layout createLayout(final Configuration config, final boolean properties, final boolean locationInfo) {
74+
return LayoutWrapper.adapt(Log4j1XmlLayout.createLayout(config, locationInfo, properties));
7575
}
7676
}

0 commit comments

Comments
 (0)