diff --git a/logback-core/src/main/java/ch/qos/logback/core/joran/spi/InterpretationContext.java b/logback-core/src/main/java/ch/qos/logback/core/joran/spi/InterpretationContext.java index e9e6d95483..2c0292b5ff 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/joran/spi/InterpretationContext.java +++ b/logback-core/src/main/java/ch/qos/logback/core/joran/spi/InterpretationContext.java @@ -132,8 +132,10 @@ public void addSubstitutionProperties(Properties props) { if (props == null) { return; } - for (String key : props.stringPropertyNames()) { - addSubstitutionProperty(key, props.getProperty(key)); + for(Object keyObject: props.keySet()) { + String key = (String) keyObject; + String val = props.getProperty(key); + addSubstitutionProperty(key, val); } }