[AWS][Log]Docker输出日志
![[AWS][Log]Docker输出日志](/content/images/size/w1200/2020/05/horizontal-logo-monochromatic-white.png)
Fargate, 想输出固定日志到cloudwatch,参考了
An amazing recipe is given in the nginx Dockerfile:
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
Simply, the app can continue writing to it as a file, but as a result the lines will go to stdout & stderr!