Clear Scrapy Splash Logs

941 Views Asked by At

I'm using scrapy splash inside a docker container, but the image disk usage increase rapidly until it eats out all available space. How can the log files be removed and how to limit the available size for the splash logs?

Thanks

1

There are 1 best solutions below

1
On BEST ANSWER

To find out the log file of Splash container, use this command:

sudo docker inspect --format='{{.LogPath}}' <container>

where container is either an ID or name. Once you have the log file path, you can remove it, or better shrink it, e.g. by:

sudo truncate -s 0 <logfile_path>

If you want to limit the size of logs, you can configure it through Docker's daemon.json config file. On Linux, it's default location is in /etc/docker (look into documentation for the right options).