Details
When a node starts, shuts down, or processes a , it produces a stream of messages about the command’s activities. Each message is composed of:- A payload that contains events either structured in JSON or conveyed in an arbitrary string. For details on structured event types and their fields, see .
- An envelope that contains event metadata (e.g., severity, date, timestamp, channel). Depending on the log format you specify when , the envelope can be formatted either in JSON or as a flat prefix to the message.
Logging channels
Log channels cannot be completely disabled. You can configure and , but you cannot turn off a log channel entirely. For example, a channel that is not explicitly configured for a is enabled in the
default file group.| Channel | Description |
|---|---|
| Uncategorized and debug messages. | |
| Process starts, stops, shutdowns, and crashes (if they can be logged); changes to cluster topology, such as node additions, removals, and decommissions. | |
| Resource usage; node-node connection events, including connection errors; up- and down-replication and range unavailability. | |
| Low-level storage logs from the . | |
Client connections and disconnections (when enabled via the server.auth_log.sql_connections.enabled ); SQL authentication logins/attempts and session/query terminations (when enabled via the server.auth_log.sql_sessions.enabled ). | |
| Database, schema, table, sequence, view, and type creation; changes to table columns and sequence parameters. | |
| Changes to users, roles, and authentication credentials. | |
| Changes to privileges and object ownership. | |
| SQL audit events (when enabled via ). | |
SQL statement executions (when enabled via the sql.trace.log_statement_execute ) and uncaught Go panic errors during SQL statement execution.Warning: Logging cluster-wide executions by enabling the sql.trace.log_statement_execute cluster setting will incur considerable overhead and may have a negative performance impact. | |
SQL executions that impact performance, such as slow queries (when enabled via the sql.log.slow_query.latency_threshold and/or sql.log.slow_query.experimental_full_table_scans.enabled ). | |
| Telemetry events for internal usage, except for which may be . | |
| Data distribution events, such as moving between in a cluster, adding replicas to , and removing replicas from ranges. |
Logging destinations
When using the , the events collected on each logging channel are split into log files as follows:| Filename | Description | Channels |
|---|---|---|
cockroach.log | General CockroachDB log | DEV |
cockroach-health.log | Health log | HEALTH |
cockroach-kv-distribution.log | Data distribution log | KV_DISTRIBUTION |
cockroach-security.log | SQL security log | PRIVILEGES + USER_ADMIN |
cockroach-sql-audit.log | SQL access audit log | SENSITIVE_ACCESS |
cockroach-sql-auth.log | SQL authentication log | SESSIONS |
cockroach-sql-exec.log | SQL execution log | SQL_EXEC |
cockroach-sql-slow.log | SQL slow query log | SQL_PERF |
cockroach-sql-schema.log | SQL schema change log | SQL_SCHEMA |
cockroach-pebble.log | Pebble log | STORAGE |
cockroach-telemetry.log | Telemetry log | TELEMETRY |

