Skip to content

Commit 99ccca7

Browse files
committed
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent df7c7c5 commit 99ccca7

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

logback-core/src/main/java/ch/qos/logback/core/joran/action/ActionUtil.java

-31
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,6 @@ static public Scope stringToScope(String scopeStr) {
3838
return Scope.LOCAL;
3939
}
4040

41-
// static public void setProperty(SaxEventInterpretationContext ic, String key, String value, Scope scope) {
42-
// switch (scope) {
43-
// case LOCAL:
44-
// ic.addSubstitutionProperty(key, value);
45-
// break;
46-
// case CONTEXT:
47-
// ic.getContext().putProperty(key, value);
48-
// break;
49-
// case SYSTEM:
50-
// OptionHelper.setSystemProperty(ic, key, value);
51-
// }
52-
// }
5341

5442
static public void setProperty(ContextAwarePropertyContainer ic, String key, String value, Scope scope) {
5543
switch (scope) {
@@ -63,23 +51,4 @@ static public void setProperty(ContextAwarePropertyContainer ic, String key, Str
6351
OptionHelper.setSystemProperty(ic, key, value);
6452
}
6553
}
66-
67-
// /**
68-
// * Add all the properties found in the argument named 'props' to an
69-
// * InterpretationContext.
70-
// */
71-
// static public void setProperties(SaxEventInterpretationContext ic, Properties props, Scope scope) {
72-
// switch (scope) {
73-
// case LOCAL:
74-
// ic.addSubstitutionProperties(props);
75-
// break;
76-
// case CONTEXT:
77-
// ContextUtil cu = new ContextUtil(ic.getContext());
78-
// cu.addProperties(props);
79-
// break;
80-
// case SYSTEM:
81-
// OptionHelper.setSystemProperties(ic, props);
82-
// }
83-
// }
84-
8554
}

logback-core/src/main/java/ch/qos/logback/core/model/ModelUtil.java

+30
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
*/
1414
package ch.qos.logback.core.model;
1515

16+
import ch.qos.logback.core.joran.action.ActionUtil.Scope;
17+
import ch.qos.logback.core.model.processor.ModelInterpretationContext;
18+
import ch.qos.logback.core.model.util.PropertyModelHandlerHelper;
19+
20+
import java.util.Properties;
21+
1622
public class ModelUtil {
1723

1824

@@ -22,4 +28,28 @@ static public void resetForReuse(Model model) {
2228
model.resetForReuse();
2329
}
2430

31+
32+
33+
/**
34+
* Add all the properties found in the argument named 'props' to an
35+
* ModelInterpretationContext.
36+
*
37+
* @deprecated moved to {@link PropertyModelHandlerHelper#setProperty}
38+
*/
39+
@Deprecated
40+
static public void setProperty(ModelInterpretationContext mic, String key, String value, Scope scope) {
41+
PropertyModelHandlerHelper.setProperty(mic, key, value, scope);
42+
}
43+
44+
/**
45+
* Add all the properties found in the argument named 'props' to an
46+
* ModelInterpretationContext.
47+
*
48+
* @deprecated moved to {@link PropertyModelHandlerHelper#setProperties}
49+
*/
50+
@Deprecated
51+
static public void setProperties(ModelInterpretationContext mic, Properties props, Scope scope) {
52+
PropertyModelHandlerHelper.setProperties(mic, props, scope);
53+
}
54+
2555
}

0 commit comments

Comments
 (0)