Summary: | New "default values in property value expressions" syntax breaks Log4j2's "property substitution" syntax | ||
---|---|---|---|
Product: | Tomcat 8 | Reporter: | Frank Erens <frank.erens> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | frank.erens |
Priority: | P2 | ||
Version: | 8.5.54 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | FreeBSD |
Description
Frank Erens
2020-04-30 07:39:11 UTC
I don't like that the change in default format isn't backwards compatible but given the popularity of log4j2 and that the Tomcat feature is relatively new, I think this is the right thing to do. Ok, this is unfortunate. Or maybe this feature could be skipped in some cases [with an option, skip by default], like for web.xml and the user descriptors ? To be honest, it is rather bad to do any property replacement at all there as it makes the webapp non portable. If it is kept, I don't really like ":-" as it's not intuitive, is "::" possible instead ? ${variable:-default} syntax is also used by bash/sh: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html I would also recommend to use :-. This shell/bsah default. Logback uses the same style. Ok for ":-" then. This will be in 10.0-M5, 9.0.35, 8.5.55, 7.0.104. Thank you for resolving this so quickly! Another vote in favor of ":-" |