Unwanted log keys of sync gateway


#1

Hi,

We are running the latest sync gateway version with the folloing log configs:


“log” : [ “Access”, “Attach”, “Auth”, “Bucket”, “CRUD”, “DCP”, “Events”, “Feed”, “HTTP”, “Replicate”, “Import+”, “Sync”],
“logging”: {
“log_file_path” : “/home/sync_gateway”,
“error”: {

However, in the info logs, we saw that logs were populated with lots of “Cache” typed logs. We simply don’t want that because in this case, it is just reached to maximum size quickly.

Am I doing something wrong? I didn’t give “Cache” type in the log keys.

Thanks.


#2

Hi, as of Sync Gateway 2.1 and the continuous logging feature, the sg_*.log files cannot be filtered down by log key to ensure first-time data capture for diagnosing issues. Only the console logging output is filtered by key.

If you’re having issues with these log files filling up your disk, I’d suggest tweaking the max_age config option to clean them up more often.

If you’re collecting these logs for your own benefit, you can instead look at the filtered “console log”, which is written to stderr from Sync Gateway directly, or piped into a /home/sync_gateway/logs/sync_gateway_error.log file if you’re running Sync Gateway via the service scripts.


#3

Hi,

Thanks for the information. As you said sync_gateway_error log has been just populated after I opened the console logging. But it reached to 45500 kb already (I gave the specific keys) - it put all the logs from very begining - and difficult to investigate it. Is there better way to handle this?

Thanks.