Changing the sync_gateway log directory


#1

for changing the log path in the sync_gateway , I change in the configuration file , But my log location is not change . Here the step that I follow -

“logging”: {
“log_file_path”: “C:\Program Files\Couchbase\Sync Gateway\var\log\sync_gateway”,
“console”: {
“log_level”: “none”
},
“error”: {
“rotation”: {
“max_size”: 1,
“max_age”: 180
},
“warn”: {
“rotation”: {
“max_size”: 1,
“max_age”: 90
},
“info”: {
“rotation”: {
“max_size”: 1,
“max_age”: 3
}
}


#2

Hi,

Backslashes in JSON need to be escaped. E.g:

“log_file_path”: “C:\\Program Files\\Couchbase\\Sync Gateway\\var\\log\\sync_gateway”,

#3

Hi,
this rotation is not working in sync gaeway 1.5 version ,
Can I relocate log in 1.5 version


#4

Yes, the config format you had in your original post is for Sync Gateway 2.1.

Please see the 1.5 documentation for configuration reference.
https://docs.couchbase.com/sync-gateway/1.5/config-properties.html

logging: {
    default: {
      logFilePath: "string",
      logKeys: "string",
      logLevel: "string",
      rotation: {
        maxsize: 0,
        maxage: 0,
        maxbackups: 0,
        localtime: false
      }
    }
  },