logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Berman <rexx...@gmail.com>
Subject [log4j2] Custom Layout Configuration Help
Date Fri, 02 Aug 2013 16:47:02 GMT

I've written a custom layout and a helper class.  It all works great,
however, my question has to do with how to interpolate the variables inside
of an attribute in the configuration.  For example:

<Socket name="socket" host="foo.com" port="5544" protocol="TCP">
  <additionalField name="program" value="${sys:mySysProperty}"/>
 <additionalField name="environment" value="qa"/>

What I'm trying to figure out is how I can get the $[sys:mySysProperty} to
resolve to the proper value.  I've looked through the code at
DailyRollingFileAppender to see how it does it, but I can't seem to find
anything actually performing the resolution.  Can someone point me in the
right direction?



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