4.8. Logging

4.8.1. Logging options

[log]

CouchDB logging configuration.
writer

Current writers include:

- stderr: Logs are sent to stderr.
- file: Logs are sent to the file set inlog file.
- syslog: Logs are sent to the syslog daemon.
You can also specify a full module name here if implement your ownwriter:




  1. [log]
    writer = stderr



file

Specifies the location of file for logging output. Only used by thefile writer:




  1. [log]
    file = /var/log/couchdb/couch.log




This path should be readable and writable for user that runs CouchDBservice (couchdb by default).
write_buffer

Specifies the size of the file log write buffer in bytes, to enabledelayed log writes. Only used by the filewriter:




  1. [log]
    write_buffer = 0



write_delay

Specifies the wait in milliseconds before committing logs to disk, toenable delayed log writes. Only used by the filewriter:




  1. [log]
    write_delay = 0



level


Changed in version 1.3: Added warning level.


Logging level defines how verbose and detailed logging will be:




  1. [log]
    level = info




Available levels:

- debug: Detailed debug logging.
- info: Informative logging. Includes HTTP requests headlines,startup of an external processes etc.
- notice
- warning or warn: Warning messages are alerts about edge situations thatmay lead to errors. For instance, compaction daemon alerts about lowor insufficient disk space at this level.
- error or err: Error level includes only things that go wrong, like crashreports and HTTP error responses (5xx codes).
- critical or crit
- alert
- emergency or emerg
- none: Disables logging any messages.
include_sasl

Includes SASL information in logs:




  1. [log]
    include_sasl = true



syslog_host

Specifies the syslog host to send logs to. Only used by thesyslog writer:




  1. [log]
    syslog_host = localhost



syslog_port

Specifies the syslog port to connect to when sending logs. Only used bythe syslog writer:




  1. [log]
    syslog_port = 514



syslog_appid

Specifies application name to the syslogwriter:




  1. [log]
    syslog_appid = couchdb



syslog_facility

Specifies the syslog facility to use with the syslogwriter:




  1. [log]
    syslog_facility = local2



原文: http://docs.couchdb.org/en/stable/config/logging.html