You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "adwsingh (via GitHub)" <gi...@apache.org> on 2023/02/07 09:27:52 UTC

[GitHub] [logging-log4j2] adwsingh opened a new pull request, #1268: Making legacy normalized properties from the same source have higher …

adwsingh opened a new pull request, #1268:
URL: https://github.com/apache/logging-log4j2/pull/1268

   Fix for https://issues.apache.org/jira/browse/LOG4J2-3621


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j2] adwsingh commented on a diff in pull request #1268: Making legacy normalized properties from the same source have higher …

Posted by "adwsingh (via GitHub)" <gi...@apache.org>.
adwsingh commented on code in PR #1268:
URL: https://github.com/apache/logging-log4j2/pull/1268#discussion_r1098611283


##########
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java:
##########
@@ -71,6 +71,20 @@ default CharSequence getNormalForm(Iterable<? extends CharSequence> tokens) {
         return null;
     }
 
+    /**
+     * Converts a list of property name tokens into a normal form of legacy type. For example, a list of tokens such as
+     * "foo", "bar", "baz", might be normalized into the property name "log4j.fooBarBaz".
+     * </p>
+     * This is not supposed to be implemented by newer implementations, but only exists to add compatibility support
+     * for existing implementations.
+     *
+     * @param tokens list of property name tokens
+     * @return a normalized legacy property name using the given tokens
+     */
+    default CharSequence getLegacyNormalForm(Iterable<? extends CharSequence> tokens) {
+        return null;
+    }
+

Review Comment:
   Updated the PR.



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j2] ppkarwasz merged pull request #1268: Making legacy normalized properties from the same source have higher …

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz merged PR #1268:
URL: https://github.com/apache/logging-log4j2/pull/1268


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j2] adwsingh closed pull request #1268: Making legacy normalized properties from the same source have higher …

Posted by "adwsingh (via GitHub)" <gi...@apache.org>.
adwsingh closed pull request #1268: Making legacy normalized properties from the same source have higher …
URL: https://github.com/apache/logging-log4j2/pull/1268


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [logging-log4j2] ppkarwasz commented on a diff in pull request #1268: Making legacy normalized properties from the same source have higher …

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #1268:
URL: https://github.com/apache/logging-log4j2/pull/1268#discussion_r1098507631


##########
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java:
##########
@@ -71,6 +71,20 @@ default CharSequence getNormalForm(Iterable<? extends CharSequence> tokens) {
         return null;
     }
 
+    /**
+     * Converts a list of property name tokens into a normal form of legacy type. For example, a list of tokens such as
+     * "foo", "bar", "baz", might be normalized into the property name "log4j.fooBarBaz".
+     * </p>
+     * This is not supposed to be implemented by newer implementations, but only exists to add compatibility support
+     * for existing implementations.
+     *
+     * @param tokens list of property name tokens
+     * @return a normalized legacy property name using the given tokens
+     */
+    default CharSequence getLegacyNormalForm(Iterable<? extends CharSequence> tokens) {
+        return null;
+    }
+

Review Comment:
   There is no legacy normal form.
   
   Legacy properties have an incoherent naming policy (cf. [documentation](https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties)), that is why they were replaced with the new normalized version.
   
   However Log4j2 code uses **only** legacy properties internally, so you can be sure that the parameter of an `Environment#get(String)` call is a legacy property.



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org