|
28 | 28 | import org.apache.log4j.config.PropertiesConfiguration;
|
29 | 29 | import org.apache.log4j.layout.Log4j1XmlLayout;
|
30 | 30 | import org.apache.log4j.xml.XmlConfiguration;
|
31 |
| -import org.apache.logging.log4j.core.config.DefaultConfiguration; |
| 31 | +import org.apache.logging.log4j.core.config.Configuration; |
32 | 32 | import org.apache.logging.log4j.plugins.Namespace;
|
33 | 33 | import org.apache.logging.log4j.plugins.Plugin;
|
34 | 34 | import org.w3c.dom.Element;
|
@@ -60,17 +60,17 @@ public Layout parse(final Element layoutElement, final XmlConfiguration config)
|
60 | 60 | locationInfo.set(getBooleanValueAttribute(currentElement));
|
61 | 61 | }
|
62 | 62 | });
|
63 |
| - return createLayout(properties.get(), locationInfo.get()); |
| 63 | + return createLayout(config, properties.get(), locationInfo.get()); |
64 | 64 | }
|
65 | 65 |
|
66 | 66 | @Override
|
67 | 67 | public Layout parse(final PropertiesConfiguration config) {
|
68 | 68 | final boolean properties = getBooleanProperty(PROPERTIES);
|
69 | 69 | final boolean locationInfo = getBooleanProperty(LOCATION_INFO);
|
70 |
| - return createLayout(properties, locationInfo); |
| 70 | + return createLayout(config, properties, locationInfo); |
71 | 71 | }
|
72 | 72 |
|
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)); |
75 | 75 | }
|
76 | 76 | }
|
0 commit comments