-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
Yeah, it doesn't functionally matter. I know. Now.
If the rule is to follow camelCaseNames, then shouldn't new source set a good example?
Configuration
2.24.0
Logs
Reproduction
https://logging.apache.org/log4j/2.x/manual/systemproperties.html#log4j2.scriptEnableLanguages says it's log4j2.scriptEnableLanguages.
We're told earlier, by https://logging.apache.org/log4j/2.x/manual/systemproperties.html that:
Since Log4j 2.10 all the property names follow a common naming scheme:
log4j2.camelCasePropertyName
So scriptEnableLanguages then - simple, clear, good. It does go on to say:
To provide backward compatibility with versions older than 2.10 a certain number of additional property names is also supported using a fuzzy matching algorithm.
(There's a plural agreement problem there - "is" should be "are".)
However, the notes for a release later than 2.10, https://logging.apache.org/log4j/2.x/release-notes.html#release-notes-2-17-2, say:
Require log4j2.Script.enableLanguages to be specified to enable scripting for specific languages. (LOG4J2-2486)
... and that different name is indeed the only name to be found in the source, at least the parts that aren't documentation, at https://github.com/search?q=repo%3Aapache%2Flogging-log4j2+enableLanguages&type=code.
It wasn't until I found
https://github.com/apache/logging-log4j2/blob/2.x/log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java#L135 that I became convinced that this wasn't the cause of my problems.
Tidying up old source code, that's somewhat risky and no fun, but shouldn't new code follow the new rules?