cockroach debug merge-logs merges log files from multiple nodes into a single time-ordered stream of messages with an added per-message prefix to indicate the corresponding node. You can use it in conjunction with logs collected using the command to aid in debugging.
The file produced by
cockroach debug zip can contain highly , such as usernames, hashed passwords, and possibly your table’s data. You can use the --redact flag to redact the sensitive data out of log files and crash reports before sharing them with Cockroach Labs.Subcommands
While thecockroach debug command has a few subcommands, users are expected to use only the , , , , , and subcommands.
We recommend using the and subcommands only when directed by the .
The other debug subcommands are useful only to Cockroach Labs. Output of debug commands may contain sensitive or secret information.
Synopsis
Flags
Thedebug merge-logs subcommand supports the following flags:
| Flag | Description |
|---|---|
--format | Required The in the log file directory. The logs in a .zip generated using are of type . |
--filter | Limit the results to the specified regular expression |
--from | Start time for the time range filter. |
--to | End time for the time range filter. |
--redact | Redact from the log files. |
Example
Generate a debug zip file:Considerations
As of v23.2, logs can be configured to use a . This is a .cockroach debug merge-logs requires v23.2 or later if run against logs with the timezone configured. With versions prior to v23.2, cockroach debug merge-logs will return an error if run against logs with the timezone configured.

