My current workflow is to start/stop/restart SG like these commands:service sync_gateway start|stop|restart
I’d still like to use this workflow after setting up log rotation.

At the moment it seems that there is no log rotation setup as there is only one sync_gateway_error.log file which is GBs in size. I don’t know where to add this config:/home/sync_gateway/logs/* { daily rotate 1 size 10M delaycompress compress notifempty missingok postrotate /usr/bin/pkill -HUP sync_gateway > /dev/null endscript }
Would I add this to the sync_gateway.json file? Mine look similar to this:

Then I restarted SG service sync_gateway restart. I synced a few documents and changes were written to the file.tail -100 sync_gateway_error.log
As far as I understand the logrotate config it should create a new log file as soon as the file is 10Mb in size. Could I somehow do some other checks or tests. Also I named the logrotate file sync_gateway. I’m unsure if I need to reference this anywhere or if it should have a different name.