when the LogManager does it's replace of ${property} it doesn't handle properly the fact that a } could exist before ${. The indexOf for the char } should be relative to the start position of ${ Example of string : %{custom.property.matching} ${system.property.tomcat} This would throw an exception about the index } being before ${ This is valid for all the 7.* versions as well as all the 6.* versions (validated from 6.0.27 and above). There is not even a way to "escape" the ${} chars if we'd like to output them.
I see. Please be more specific next time: you are referring to the source code of method replace(String) of class org.apache.juli.ClassLoaderLogManager. I acknowledge the issue with indexOf. > There is not even a way to "escape" the ${} chars if we'd like to output them. You can define a system property that expands to ${} or to ${ or whatever. As you might see from the code, the replacement text is used "as is" and is not searched further for replacement characters.
Fixed in 7.0.x and will be included in 7.0.15 onwards. Proposed for 6.0.x
I reimplemented the property substitution code in r1133857 with several improvements. See commit message and test cases. It will be in 7.0.16. Proposed for 6.0.x
The fix applied 6.0 in r1136010. Will be in 6.0.33.