Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-27194

Add explicit logger config section to memcached.json

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • ns_server
    • None

    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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              artem Artem Stemkovski
              eugen.virtan Eugen Virtan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty