title: Spring Boot batch job - Unable to run from commandLine
body: <p>I am putting below command.</p>
  
  <pre><code>java -jar -Dlogging.config=C:\Users\P2932832\BPradhan\order-batch\order-batch\config\logback.xml order-batch-0.0.1-SNAPSHOT.jar --spring.config.location=C:\Users\P2932832\BPradhan\order-batch\order-batch\src\main\resources\application.yml
  </code></pre>
  
  <p>Then I can see below logs. But, when it is time to write rest of the logs on logs/order-batch.log , it is not doing anything. But, if I use STS , it runs perfectly fine and writes log to order-batch.log. My users needs to run command line , so it will be helpful , if i can see logs in order-batch.log</p>
  
  <pre><code>09:43:47,566 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.spectrum.sci] to DEBUG
  09:43:47,569 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating DEBUG level on Logger[com.spectrum.sci] onto the JUL framework
  09:43:47,572 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [httpclient] to WARN
  09:43:47,576 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[httpclient] onto the JUL framework
  09:43:47,576 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache] to WARN
  09:43:47,576 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[org.apache] onto the JUL framework
  09:43:47,576 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.context] to WARN
  09:43:47,578 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[org.springframework.context] onto the JUL framework
  09:43:47,579 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.core] to WARN
  09:43:47,579 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[org.springframework.core] onto the JUL framework
  09:43:47,580 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.beans] to WARN
  09:43:47,580 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[org.springframework.beans] onto the JUL framework
  09:43:47,581 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.web] to WARN
  09:43:47,581 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating WARN level on Logger[org.springframework.web] onto the JUL framework
  09:43:47,581 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.security] to DEBUG
  09:43:47,583 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating DEBUG level on Logger[org.springframework.security] onto the JUL framework
  09:43:47,585 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
  09:43:47,591 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
  09:43:47,637 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@787387795 - No compression will be used
  09:43:47,645 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@787387795 - Will use the pattern logs/order-batch.%d{yyyy-MM-dd}.%i.log for the active file
  09:43:47,651 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7907ec20 - The date pattern is 'yyyy-MM-dd' from file name pattern 'logs/order-batch.%d{yyyy-MM-dd}.%i.log'.
  09:43:47,655 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7907ec20 - Roll-over at midnight.
  09:43:47,665 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7907ec20 - Setting initial period to Fri Apr 10 09:38:51 MDT 2020
  09:43:47,666 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7907ec20 - SizeAndTimeBasedFNATP is deprecated. Use SizeAndTimeBasedRollingPolicy instead
  09:43:47,669 |-WARN in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7907ec20 - For more information see http://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
  09:43:47,673 |-WARN in Logger[org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator] - No appenders present in context [default] for logger [org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator].
  09:43:47,675 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
  09:43:47,705 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: logs/order-batch.log
  09:43:47,707 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [logs/order-batch.log]
  09:43:47,720 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
  09:43:47,721 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@71f2a7d5 - Propagating INFO level on Logger[ROOT] onto the JUL framework
  09:43:47,735 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
  09:43:47,737 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
  09:43:47,767 |-INFO in org.springframework.boot.logging.logback.SpringBootJoranConfigurator@2aaf7cc2 - Registering current configuration as safe fallback point
  
    .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v2.2.6.RELEASE)
  
  
  Here is my application.yml
  
  server:
    port: 8080
  
  osm.service.url: http://localhost:8090/order-manager/order  
  osm.service.username: TOS_Automation
  osm.service.password: TOS_Automation$123
  
  logging.config: config/logback.xml
  
  
  Here is logback.xml
  
  
  &lt;configuration debug="true"&gt;
  
      &lt;!-- logger name="com.spectrum.sci" level="${log.level}" /--&gt;
      &lt;logger name="com.spectrum.sci" level="INFO" /&gt;
      &lt;logger name="httpclient" level="WARN" /&gt;
      &lt;logger name="org.apache" level="WARN" /&gt;
      &lt;logger name="org.springframework.context" level="WARN" /&gt;
       &lt;logger name="org.springframework.core" level="WARN" /&gt;
      &lt;logger name="org.springframework.beans" level="WARN" /&gt;
      &lt;logger name="org.springframework.web" level="WARN" /&gt;
      &lt;logger name="org.springframework.batch" level="DEBUG" /&gt;
      &lt;logger name="org.springframework.security" level="DEBUG" /&gt;
  
      &lt;appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
          &lt;file&gt;logs/order-batch.log&lt;/file&gt;
          &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
              &lt;fileNamePattern&gt;logs/order-batch.%d{yyyy-MM-dd}.%i.log&lt;/fileNamePattern&gt;
              &lt;maxHistory&gt;10&lt;/maxHistory&gt;
              &lt;timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"&gt;
                  &lt;maxFileSize&gt;5MB&lt;/maxFileSize&gt;
              &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;
          &lt;/rollingPolicy&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;[%d{YYYY-MM-dd HH:mm:ss.SSS}] [%level] [Context:%logger{0}] [%X] [%msg]%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
      &lt;root level="info"&gt;
          &lt;appender-ref ref="FILE" /&gt;
      &lt;/root&gt;
  
  &lt;/configuration&gt;
  
  </code></pre>