what is the default retention policy for TorchServe logs?
Logs are stored inside “./logs” directory. Every day they are compressed and stored.
I was wondering what is the default retention policy for these logs, and if you can set a custom log expiration date?
If there is no log removal, after some time, logs will take up all free space and docker container will fail.
I am using TorchServe version 0.6.0
it seems that TorchServe doesn’t have an inbuilt log cleaner yet.
This is a problem because it will collapse a production server in time.
To address this, I wrote a custom python script that deletes old “*.log.gz” files.
As a template, I used this code, and for scheduled runs, I implemented the PyPI library APScheduler.
In the end, from my Dockerfile, I called torchserve and python script as background processes. Something like:
python ./log_cleaner.py &
Hope it helps,
Have a good one