For having logging rotation with time Stamp I followed the “https://docs.couchbase.com/sync-gateway/2.1/logging.html” link.
I set log file path as below in my sync function configuration file:
C:\Program Files\Couchbase\Sync Gateway\var\log\sync_gateway\sglogfile.log,
it creates 3 different files for error, info and warning. I have 3 questions:
1- first of all, sometimes the logs are not rotated and they all are saved in 1 logfile, for example I set to be rotated if they became 1MB , and the size will increase up to 100MB.
2- If the sizing works, it does not the exact thing I need, I had the second test and I set the maxsize to 1, but it rotates log files in files of 10MB not 1MB.
3- I do not want to have log in default folder: C:\Program Files\Couchbase\Sync Gateway\var\lib\couchbase\logs\sync_gateway_error.txt,
as it fills do much disk space and the OS is installed there, it maks it critical.
this file log does not have rotation, and I can not do anything with it. for example I have a total 50MB of files in logFilePath I specified, but I again have
50MB of log files in default folder.