Console.log is not working on SG

I would like to write the output of console.log in file.
I understand that the output of sync function is write in sg_info.log when a console.log function is discover.
But on SG 2.6, that’s not working (Linux Os).
anybody can help me?

Sync function :

“sync”: function (doc, oldDoc) { console.log("################# LOG TEST CONSOLE ######"); }

Logging configuration :

“logging”: {
“log_file_path”: “/var/log/sync_gateway”,
“console”: {
“log_keys”: [“HTTP+”, “Sync”, “SyncMsg”],
“log_level”: “debug”,
“color_enabled”: true
},
“info”: {
“enabled”: true
},
“debug”: {
“enabled”: true
}
}

With this update I have the message of console.log:

log_keys”: [“HTTP+”, “Sync”, “SyncMsg”]
=>
log_keys”: [“*”]

For my personal culture, someone knows which key is used to view the output of console.log ?

Hi @jejom43,

The "Javascript" log key will be used for Sync Function logging.

Thank you :+1:

It’s not on documentation page for your information

https://docs.couchbase.com/sync-gateway/2.6/config-properties.html#logging-console-log_keys

Thanks, I looked it up when I replied and noticed it was missing.
I opened a PR for the 2.6 docs which should be merged soon.