carterkozak commented on a change in pull request #783:
URL: https://github.com/apache/logging-log4j2/pull/783#discussion_r819221798
##########
File path:
log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
##########
@@ -118,15 +119,36 @@ public static Property createProperty(final String name,
final String value) {
* @param value The value.
* @return A Property.
*/
+ public static Property createProperty(
+ final String name,
+ final String rawValue,
+ final String value) {
+ if (name == null) {
+ LOGGER.error("Property name cannot be null");
+ }
+ return new Property(name, rawValue, value);
+ }
+
+ /**
+ * Creates a Property.
+ *
+ * @param name The key.
+ * @param rawValue The value without any substitution applied.
+ * @param configuration configuration used to resolve the property value
from the rawValue
+ * @return A Property.
+ */
@PluginFactory
public static Property createProperty(
@PluginAttribute("name") final String name,
@PluginValue(value = "value", substitute = false) final String
rawValue,
- @PluginValue("value") final String value) {
+ @PluginConfiguration final Configuration configuration) {
Review comment:
Attribute are consumed as they're read, this way we consume the value
once, and process it using the configuration substitutor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]