JWT007 opened a new issue, #3087:
URL: https://github.com/apache/logging-log4j2/issues/3087

   *This is just a suggestion for a possible improvement*
   
   According to the Log4j 2.x documentation for MutableContextMapFilter:
   
   
https://logging.apache.org/log4j/2.x/manual/filters.html#MutableThreadContextMapFilter
   
   A 'configLocation' can be specified for the external JSON configuration map 
and can be a URI or a Path.
   
   Looking at the code for MutableThreadContextMapFilter it appears that there 
is no property resolution performed on this attribute.
   
   Conceivable is that a property is either specified in the configuration 
XML/JSON or provided by a Log4j PropertySource to provide a path determined at 
runtime.  Often a application might be installed on differnt paths and the 
configLocation might be relative to a base-path or via a spring property or 
such.
   
   ```
      <Property name="contextMapPath">C:/foo/bar/contextMaps</Property>
      <MutableContextMapFilter configLocation="${contextMapPath}/foobar.json"/>
      <MutableContextMapFilter 
configLocation="${contextMapPath}/wingding.json"/>
   ```
   
   Property resolution in the config location might be a useful feature.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to