title: How to pass properties from application.properties to logback config file
body: <p>Overview: </p>
  
  <p>I am using Sentry appender in my logback.xml file and I want to pass plenty of tags as parameters from application.properties file to logback config file.</p>
  
  <p><strong>logback.xml file:</strong> </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
      &lt;include resource="org/springframework/boot/logging/logback/defaults.xml"/&gt;
      &lt;include resource="org/springframework/boot/logging/logback/file-appender.xml"/&gt;
      &lt;include resource="org/springframework/boot/logging/logback/console-appender.xml"/&gt;
  
      &lt;appender name="SENTRY" class="com.getsentry.raven.logback.SentryAppender"&gt;
          &lt;dsn&gt;
              https://e0a61232c92f42ffa34c22914d676a8e:e64f7edc60de490eb004556d2b3fce45@sentry.io/112817
          &lt;/dsn&gt;
          &lt;springProfile name="dev"&gt;
              &lt;tags&gt;env:dev,app:${app.name},platform:aws&lt;/tags&gt;
          &lt;/springProfile&gt;
          &lt;springProfile name="stage"&gt;
              &lt;tags&gt;env:dev&lt;/tags&gt;
          &lt;/springProfile&gt;
          &lt;springProfile name="test"&gt;
              &lt;tags&gt;env:test&lt;/tags&gt;
          &lt;/springProfile&gt;
  
          &lt;filter class="ch.qos.logback.classic.filter.ThresholdFilter"&gt;
              &lt;level&gt;ERROR&lt;/level&gt;
          &lt;/filter&gt;
      &lt;/appender&gt;
  
      &lt;root level="ERROR"&gt;
          &lt;appender-ref ref="CONSOLE"/&gt;
          &lt;appender-ref ref="SENTRY"/&gt;
      &lt;/root&gt;
  
  &lt;/configuration&gt; 
  </code></pre>
  
  <p><strong>application.properties:</strong> </p>
  
  <pre><code>security.ignored=/**
  
  logging.level.root = DEBUG
  
  spring.profiles.active=dev
  app.name=retailServices
  </code></pre>
  
  <p><strong>Note:</strong> 
  the spring.profiles.active property in application.properties is mapped to springProfile tag in logback config file. </p>
  
  <hr>
  
  <p><strong>But the issue</strong> is the fact that the "app.name" property cannot be found in logback.xml file. If I use this property as system properties it works but I want to pass it to config file from application.properties. </p>
  
  <p>So any solution, feedback and idea would be highly appreciated.</p>