title: How to set logging.file and logging.file.max-size together in application.yml
body: <p>I'm trying to set logging.file and logging.file.max-size together in application.yml</p>
  
  <p>In application.properties I can write:</p>
  
  <pre><code>logging.file=file.log
  logging.file.max-size=1MB
  </code></pre>
  
  <p>But if I write in application.yml</p>
  
  <pre><code>logging:
   file: file.log
    max-size: 1MB
  </code></pre>
  
  <p>my application fails to start:</p>
  
  <pre><code>java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:556)
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.loadForFileExtension(ConfigFileApplicationListener.java:502)
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:469)
      at org.springframework.boot.context.config.ConfigFileApplicationListener$Loader.lambda$null$6(ConfigFileApplicationListener.java:450)
  </code></pre>