SG (2.1) documentation about logging


#1

Using this:

"logging": {
    "log_file_path": "/home/sync_gateway/logs", // Where to put log files
    "console": {
        "log_level": "info",  // What level to output to console - [error|warn|info|debug|none]
        "log_keys": ["HTTP"], // What log keys to output to console (comma separated)
        "color_enabled": true
    },
    "error": {
        "enabled": true,
        "rotation": {
            "max_size": 100,    // Threshold in megabytes to rotate logs
            "max_age": 360,     // Maximum days to retain log files (Min: 180)
            "localtime": false // Use local computer's time on backup timestamps (false=UTC)
        }
    },
    "warn": {
        "enabled": true,
        "rotation": {
            "max_size": 100,
            "max_age": 180,     // (Minimum: 90)
            "localtime": false
        }
    },
    "info": {
        "enabled": true,
        "rotation": {
            "max_size": 100,
            "max_age": 6,     // (Minimum: 3)
            "localtime": false
        }
    },
    "debug": {
        "enabled": false,
        "rotation": {
            "max_size": 100,
            "max_age": 2,     // (Minimum: 1)
            "localtime": false
        }
    }
}

from here in SG config still shows HTTP+, CRUD, Cache logs in the info log. Here it suggests that these logs are for debugging purposes and not for a production environment:

List of log keys to enable for diagnostic logging. Example:

{
  "logging": {
    "console": {
      "log_keys": ["HTTP", "CRUD", "Import"]
    }
  }
}

How can I disable HTTP+, CRUD, Cache logs? Is it an error in the documentation?

Thanks!


#2

Starting 2.1, we support continuous file logging. So the old way of using log keys is deprecated.
If you are on 2.1, please follow this documentation.

The log_keys only apply to console logs and default to HTTP.

For file logging, you only specify the log_level . You do not specify log_keys.