title: How to configure nginx log to file and standard output at the same time in Kubernetes Ingress?
body: <p>I use nginx ingress controller in Kubernetes. In this nginx ingress controller, we create soft link to /var/log/nginx/access.log and error.log for stdout and stderr. In the nginx.conf, we config the log as follow:</p>
  
  <pre><code>    access_log /var/log/nginx/access.log
      error_log /var/log/nginx/error.log
  </code></pre>
  
  <p>With this configuration, the log can be viewed by "kubectl logs [pod name]". Now I want to get this log to be stored as a real file not only the standard output. How to achieve that?</p>