# Logs

## Enable Client Log

Each Aerospike C client instance runs a background cluster tend thread that periodically polls all nodes for cluster status. This background thread generates log messages that reflect node additions and removals, and any errors when retrieving node status, peers, partition maps, and racks. User applications must enable this log to receive these important messages.

See [Enable Log](https://aerospike.com/docs/develop/client/c/logging/).

## Circuit Breaker

Employ a circuit breaker that activates when a maximum error count is reached for a node and rejects requests to that node until the specified error window expires. The following [`as_config`](https://aerospike.com/apidocs/c/d0/d99/structas__config) fields can create a circuit breaker.

### max\_error\_rate

Maximum number of errors allowed per node per [`error_rate_window`](https://aerospike.com/apidocs/c/d0/d99/structas__config.html#af267ff3bd51e094d723b7a03201c2dd3). Errors include connection errors, timeouts, and device overload. If maximum errors are reached, further requests to that node are retried to another node depending on the replica policy. If [`max_retries`](https://aerospike.com/apidocs/c/dc/d45/structas__policy__base.html#aef2639ed01319c007dba768b4e91e5d5) are exhausted, the back-off error code `AEROSPIKE_MAX_ERROR_RATE` is returned.

### error\_rate\_window

The number of cluster tend iterations that defines the window for [`max_error_rate`](https://aerospike.com/apidocs/c/d0/d99/structas__config.html#aef7d6bcf88f92e252648ab2461ec8d1e). One tend iteration is defined as the [`tender_interval`](https://aerospike.com/apidocs/c/d0/d99/structas__config.html#a091ca724e7e828aae66391d6a5edacc1) (default 1 second) plus the time to tend all nodes. At the end of the window, the error count is reset to zero and backoff state is removed on all nodes.

The user application can optionally use a fallback cluster to handle traffic when the circuit breaker is employed.