title: Spring Logs are NOT named properly in Spring Boot App
body: <p>In Spring Boot App with Gradle.</p>
  <p><a href="https://i.stack.imgur.com/82IUw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/82IUw.png" alt="enter image description here" /></a></p>
  <p>Below is my <strong>application yml</strong> file</p>
  <pre><code>server:
    tomcat:
      connectionTimeout: 300000
  management:
    endpoint:
      mappings:
        enabled: true
  spring:
    liquibase:
      change-log: classpath:/db/changelog/db.changelog-master.xml
    datasource:
      driver-class-name: oracle.jdbc.driver.OracleDriver
      hikari:
        minimum-idle: 5
        maximumPoolSize: 20
        idleTimeout: 30000
        maxLifetime: 2000000
        connectionTimeout: 30000
        poolName: data-pool
    jpa:
      hibernate:
        use-new-id-generator-mappings: false
        ddl-auto: none
      database-platform: org.hibernate.dialect.Oracle12cDialect
     
  </code></pre>
  <p>Below is my <strong>logback-spring.xml</strong> file</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE configuration&gt;
  &lt;configuration&gt;
  
      &lt;springProperty scope=&quot;context&quot; name=&quot;app_name&quot; source=&quot;spring.application.name&quot;/&gt;
      &lt;springProperty scope=&quot;context&quot; name=&quot;environment&quot; source=&quot;param_env&quot; defaultValue=&quot;default_env&quot;/&gt;
      &lt;springProperty scope=&quot;context&quot; name=&quot;tenant&quot; source=&quot;param_tenant&quot; defaultValue=&quot;default_tenant&quot;/&gt;
  
      &lt;property name=&quot;GENERIC_PATTERN&quot;
                value=&quot;[%date{ISO8601}] [%p] [%t] [%c{2}] %4L | %m%n&quot;/&gt;
      &lt;property name=&quot;CONSOLE_LOG_PATTERN&quot; value=&quot;$GENERIC_PATTERN&quot;/&gt;
      &lt;property name=&quot;CHARSET&quot; value=&quot;UTF-8&quot;/&gt;
  
      &lt;property name=&quot;LOG_DIR&quot;
                value=&quot;logs/${envname:-${environment}}/${param_dtlogname:-${app_name}}&quot;/&gt;
  
          &lt;appender name=&quot;API_FILE_APPENDER&quot; class=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;
  
              &lt;file&gt;${LOG_DIR}/api-${param_dtlogname}-${HOSTNAME}.log&lt;/file&gt;
              &lt;rollingPolicy class=&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy&quot;&gt;
                  &lt;!-- daily rollover --&gt;
                  &lt;fileNamePattern&gt;
                      ${LOG_DIR}/api-${param_dtlogname}-${HOSTNAME}.%d{yyyy-MM-dd}.%i.log
                  &lt;/fileNamePattern&gt;
              &lt;/rollingPolicy&gt;
          &lt;/appender&gt; 
          &lt;appender name=&quot;APPLICATION_FILE_APPENDER&quot; class=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;
  
              &lt;file&gt;${LOG_DIR}/startup-${param_dtlogname}-${HOSTNAME}.log&lt;/file&gt;
      
          &lt;/appender&gt;
      &lt;/springProfile&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>below is my <strong>bootstrap.yml file</strong></p>
  <pre><code>spring:
    application:
      name: doctors-data
  
  </code></pre>
  <p><strong>I am facing 2 issues :</strong></p>
  <p><strong>1.</strong> 1st Issue is when I see the logs that I got from my team mate, Logs has lot of <strong>IS_UNDEFINED</strong> word in it like below.  why am I getting <strong>IS_UNDEFINED</strong> word ?</p>
  <p><a href="https://i.stack.imgur.com/2KDw9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2KDw9.png" alt="enter image description here" /></a></p>
  <p><strong>2.</strong> 2nd Issue is I am not sure in intellij or my system where does these logs are getting generated ?, not able to find the location in my system.</p>
  <p>I believe the issue can be in <code>name=&quot;app_name&quot; source=&quot;spring.application.name&quot;</code> so may be I can try with <code>${spring.application.name}</code> but <strong>major issue is I am not</strong> able to see default location where logs are getting generated. once I see where do logs reside then I can try with <code>${spring.application.name}</code> currently I am not even able to verify the hit and trial approach.</p>
  <p>Can someone please guide me on above mentioned issues ?</p>