Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-235

Improve Logs and Logging Documentation in 3.x

    XMLWordPrintable

Details

    Description

      The logging behaviour has changed from 3.0.0 onwards.

      "Individual log files are automatically numbered, with the number suffix incremented for each new log, with a maximum of 20 files per log. Individual log file sizes are limited to 10MB by default."

      This is still true for memcached logs, but not for the other files.

      The following settings are in static_config:

      {disk_sink_opts,
      [{rotation, [

      {compress, true}

      ,

      {size, 41943040}

      ,

      {num_files, 5}

      ,

      {buffer_size_max, 52428800}

      ]}]}.

      This means that when a log file reaches 40MB, it will be rotated, and compressed, and we'll keep 5 rotations (current plus 4 compressed):

      rw-rw--- 1 couchbase couchbase 12M Feb 2 16:15 couchdb.log
      rw-rw--- 1 couchbase couchbase 4.8M Feb 2 16:13 couchdb.log.1.gz
      rw-rw--- 1 couchbase couchbase 4.5M Jan 30 17:35 couchdb.log.2.gz
      rw-rw--- 1 couchbase couchbase 3.9M Jan 30 17:34 couchdb.log.3.gz
      rw-rw--- 1 couchbase couchbase 5.7M Jan 30 17:30 couchdb.log.4.gz

      The largest number is always the oldest file.

      It is also possible to provide custom rotation settings for each component:

      {disk_sink_opts_disk_debug,
      [{rotation, [

      {size, 10485760}

      ,

      {num_files, 10}

      ]}]}.

      This will rotate the debug.log at 10M, and keep 10 copies (current plus 9 compressed).

      "Each log file group will also include a .idx and .siz file which holds meta information about the log file group. These files are automatically updated by the logging system."

      This is no longer true.

      If you want to add a section about configuring the rotation settings (as per DOC-218 for 2.5.x), then similar wording can be used, except, there is no need to delete the existing files, so a restart can be used instead of a 'stop, delete files, start'.

      Attachments

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

        Activity

          People

            marija Marija Jovanovic (Inactive)
            malarky Chris Malarky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty