COCKROACH-DEBUG-MERGE-LOGS(1)

NAME

cockroach-debug-merge-logs - merge multiple log files from different machines into a single stream

SYNOPSIS

cockroach debug merge-logs [flags]

DESCRIPTION

Takes a list of glob patterns (not left exclusively to the shell because of MAX_ARG_STRLEN, usually 128kB) which will be walked and whose contained log files and merged them into a single stream printed to stdout. Files not matching the log file name pattern are ignored. If log lines appear out of order within a file (which happens), the timestamp is ratcheted to the highest value seen so far. The command supports efficient time filtering as well as multiline regexp pattern matching via flags. If the filter regexp contains captures, such as

OPTIONS

--color=auto
    force use of TTY escape codes to colorize the output

--file-pattern=^(?:(?P.*)/)?(?P[^/.]+).(?P[^/.]+).(?P[^/.]+).(?P[^/.]+).(?P\d+).log$
    re which filters log files based on path, also used with prefix and program-filter

--filter=
    re which filters log messages

--format=""
    log format of the input files

--from=
    time before which messages should be filtered

-h, --help[=false]
    help for merge-logs

--prefix="${host}> "
    expansion template (see regexp.Expand) used as prefix to merged log messages evaluated on file-pattern

--program-filter=
    re which filter log files that operates on the capture group named "program" in file-pattern, if no such group exists, program-filter is ignored

--redact[=false]
    redact the input files to remove sensitive information

--redactable-output[=true]
    keep the output log file redactable

--tenant-ids=[]
    tenant IDs to filter logs by

--to=
    time after which messages should be filtered

OPTIONS INHERITED FROM PARENT COMMANDS

--enterprise-require-fips-ready[=false]
    abort if FIPS readiness checks fail

--log=

Logging configuration, expressed using YAML syntax. For example, you can
 change the default logging directory with: --log='file-defaults: {dir: ...}'.
 See the documentation for more options and details. To preview how the log
 configuration is applied, or preview the default configuration, you can use
 the 'cockroach debug check-log-config' sub-command.

--log-config-file=

File name to read the logging configuration from. This has the same effect as
 passing the content of the file via the --log flag.

--log-config-vars=[]

Environment variables that will be expanded if present in the body of the
 logging configuration.

--log-dir=

--log-dir=XXX is an alias for --log='file-defaults: {dir: XXX}'.

--logtostderr[=UNKNOWN]

--logtostderr=XXX is an alias for --log='sinks: {stderr: {filter: XXX}}'. If
 no value is specified, the default value for the command is inferred: INFO for
 server commands, WARNING for client commands.

--redactable-logs=false

--redactable-logs=XXX is an alias for --log='file-defaults: {redactable:
 XXX}}'.

--vmodule=
    comma-separated list of pattern=N settings for file-filtered logging (significantly hurts performance)

SEE ALSO

cockroach-debug(1)

HISTORY

13-May-2026 Auto generated by spf13/cobra