Using console.log() in sync function

Cant find sync_gateway_access.log on windows dev box.

Box 1
Linux Ubuntu box with SGW -
'sync_gateway_access.log ’ - is available in sync_gateway/logs
console.log() sends my debugging info to this file - Great!

Box 2
Windows - I cant see sync_gateway_access.log - Sync Gateway\var\lib\couchbase\logs

Where is console.log() being sent on Windows machines?
thank you

@TinoMclaren,

I’ve seen this behavior before of console.log() not working on windows boxes.
I think the SG team is working on a sglog() were you can turn it on/off at run time is better option vs console.log()

I called out testing needed for windows machine too .

1 Like

Hi @TinoMclaren,

As @househippo mentioned above, Sync Gateway 2.6.0 will log to the standard SG log files (sg_info.log, sg_error.log, etc.) for console.log() and console.error() inside the sync function.

This is cross-platform, has properly formatted timestamps, and enables support for log redaction too.

1 Like

@househippo @bbrks

Thank you kindly for the info, sglog will be most welcome on my windows dev machine, cant wait!

FYI: @TinoMclaren , Sync Gateway 2.6.0 has been released.

1 Like