title: How to use map lookups using Log4j2?
body: <p>I have been looking over these three sites on how to create a map lookup (or any other lookup for that matter) using log4j2:</p>
  
  <ul>
  <li><a href="http://logging.apache.org/log4j/2.x/manual/extending.html#Lookups" rel="nofollow noreferrer">http://logging.apache.org/log4j/2.x/manual/extending.html#Lookups</a></li>
  <li><a href="http://logging.apache.org/log4j/2.x/manual/lookups.html" rel="nofollow noreferrer">http://logging.apache.org/log4j/2.x/manual/lookups.html</a></li>
  <li><a href="http://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution" rel="nofollow noreferrer">http://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution</a></li>
  </ul>
  
  <p>I understand the general idea behind what I am reading, I am just having a difficult time putting all the bits and pieces together. </p>
  
  <p><strong>Goal</strong></p>
  
  <p>To be able to place a variable, of some sort, in a log4j2.xml file that at configuration time, or runtime, replaces that variable with the values in a resource bundle. This is what i have so far:</p>
  
  <p><strong>Configuration File</strong></p>
  
  <p><img src="https://i.stack.imgur.com/q2Sfc.png" alt="enter image description here"></p>
  
  <p><strong>Lookup Class</strong></p>
  
  <p><img src="https://i.stack.imgur.com/5SHLF.png" alt="enter image description here"></p>
  
  <p>The getValue(key) method looks in a resource bundle for the email values associated with that key.The @Plugin name is "map" which, if i have read correctly, is related to prefixes in the .xml file that are also "map". So, wouldn't "error.notification.emails" get passed into the lookup(String key) method in the MapPropertiesLookup class? What do i need to do in order to get this to work?</p>