Console.log is not working in sync function


I have been trying to debug sync function and for that I am using “console.log”; however, I could not see any data log (console.log stdoutput) in “Couchbase\var\lib\couchbase\logs\sync_gateway_error.log” file. sync gateway config I am using “log”: ["*"];

When i tried with various casing like “Console.log” or “console.Log” I see an error " 500 Exception in JS sync function".
I have also tried just a “log()” function, to my surprise it does not break sync function neither it log anything.

What I am doing wrong here?

I am using couchbase sync gateway 1.5.1 (Windows)


console.log should work but will be logged to sync_gateway_access.log.

tail -n 50 /home/sync_gateway/logs/sync_gateway_access.log


Thanks @jamiltz … I could not find this file anywhere in my C:\ (“couchbase installation drive”)… Do you know If I need to enable something somewhere to get these log created?



I have observed that console.log() does not work properly on Windows boxes.

There is a new sglog() being proposed here:

It be great to have a way to dynamically turn on and off sglog() instead of change the sync function and adding console.log and un commenting console.log.


Thanks @househippo I read this issue before and tried no luck :unamused: I know one point of time it did work… I remember vaguely log level was not set to log :["*"] it was something else.


How can we view this on a Windows machine? This file is not present.