title: Spring Boot on AWS Elastic Beanstalk and logging to a file
body: <p>I have been looking to find an easy way to view debug statements on Beanstalk as I develop.  I thought I could simply log to a file on Beanstalk.</p>
  <p>In my application.properties file I set</p>
  <pre><code>logging.file.path=/var/log
  </code></pre>
  <p>And that did not produce any results even on my local machine.  I am not sure if it's a permission issue or what, but locally I set the path to my home directory and then I saw the file, spring.log, appear.</p>
  <p>With Beanstalk I tried /var/log, var/log/tomcat, /home/webapp/, ./, ~, and various other values.  Nothing worked.</p>
  <p>I even tried what was suggested here with no luck:  <a href="https://medium.com/vividcode/logging-practice-for-elastic-beanstalk-java-apps-308ed7c4d63f" rel="nofollow noreferrer">https://medium.com/vividcode/logging-practice-for-elastic-beanstalk-java-apps-308ed7c4d63f</a></p>
  <p>If logging to file is not a good idea, what are the alternatives?  I have Googled a lot about this issue and all answers are not very clear.</p>