Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Logs sent to stdout in docker but seeing old logs where are they coming from?

$
0
0
I have NGINX setup in a docker container which configures NGINX access logs to stdout with this

RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log

When the container is built I see access logs scroll across my terminal from late last year until it reaches today. At which point anytime I hit my server I see the new output of the logs in my terminal.

I SSHed into the container and checked for any old log files in /var/* but cannot find any. It seems as if logs are being stored somewhere in the container.

Where can I check for the old logs to clear them out. I'd like to delete them because starting and stopping the container makes my terminal scroll for 5-10 minutes worth of logs.Is there any caching / buffering of logs which I can clear some how. I've searched the entire container for strings within the logs but cannot find them.

Any help is appreciated

Thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>