Description
Currently, when ns_server generates the settings in memcached.json, the file logger configuration is specified as an extension field. Eg:
|
"extensions": [ |
{
|
"module": "/Users/eugen-virtan/repos/couchbase/source/install/lib/memcached/file_logger.so", |
"config": "cyclesize=10485760;sleeptime=19;filename=logs/n_0/memcached.log" |
}
|
]
|
The use of an extension interface adds unnecessary complexity which can be removed by moving the logger configuration from the extensions field into a separate JSON object.
KV-Engine would like to move to a simpler; more explicit model where we configure the logger with it's own config group:
|
"logger": {"filename": "logs/n_0/memcached.log", |
"cyclesize": 10485760, |
"sleeptime": 19} |
The interface which parses this new "logger" object has been added in the following patch: http://review.couchbase.org/#/c/86015/
The logger object can contain the following fields (all have sensible default values if they are not specified):
- "filename": "string" -> the path to and the prefix of the logfile
- "buffersize": unsigned int -> the size of the logger's internal queue (in bytes) - note will be rounded by KV-Engine to a power of 2 (currently moving over to spdlog, which only supports powers of 2 for the queue size)
- "cyclesize": unsigned int -> max size of a logfile (in bytes)
- "sleeptime": unsigned int -> seconds between forced flushes of the log buffer
- "unit_test": bool -> if running in a unit test or production (ns_server can ignore this).
Attachments
Issue Links
- has to be done after
-
MB-26938 Move logger configuration from extension to explicit logger config section
- Closed
For Gerrit Dashboard: MB-27194 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
86754,5 | MB-27194 Add explicit logger config section to memcached.json | master | ns_server | Status: MERGED | +2 | +1 |