logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behrang Saeedzadeh <behran...@gmail.com>
Subject Do we need two leading $ signs for lookups inside XML elements and one $ inside XML attributes?
Date Thu, 04 Jan 2018 00:40:32 GMT
>From the docs, $$ inside the <pattern> element:


   1. <File name="Application" fileName="application.log">
   2. <PatternLayout>
   3. <pattern>%d %p %c{1.} [%t] $${env:USER} %m%n</pattern>
   4. </PatternLayout>
   5. </File>


Also from the docs, $ inside the header attribute:


   1. <File name="Application" fileName="application.log">
   2. <PatternLayout header="${java:runtime} - ${java:vm} - ${java:os}">
   3. <Pattern>%d %m%n</Pattern>
   4. </PatternLayout>
   5. </File>


I just read the docs on property substitution and how StrLookup treat
variables with multiple leading '$' characters, but it is not obvious to me
why in the two examples above, in one example two leading $ signs are used,
and in the other only one $ is used.

Best regards,
Behrang Saeedzadeh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message