A newer version of this documentation is available.

View Latest
February 16, 2025
+ 12

Redacts log files

SYNOPSIS

cblogredaction [-h] (-s <string> | -g) [-t <num>] [-o <path>] [-v]
                 File [File …​]

DESCRIPTION

A tool to redact log files outside of Couchbase Server such as, SDK and cbbackupmgr log files. The redacted file will be named redacted-[filename] and will be placed in the current working directory.

OPTIONS

-h, --help

Show the help message.

-s <string>, --salt <string>

Specifies the salt to used to hash the data. If possible the salt should be the same used by Couchbase Server to allow the logs to be easily cross referenced. The Couchbase Server salt is at the top of the couchbase.log in the zip file generated by cbcollect_info.

-g, --generate-salt

Automatically generated the salt used to hash the data. This will make it harder to cross reference logs, where possible the salt should be specified using the -s option.

-t <num>, --threads <num>

The number of threads to use to redact the files. This option should only be used when multiple files are specified as only one thread can work on one file at a time.

-o <path>, --output-dir <path>

Specifies the directory to place the redacted log in, if this option is not used the redacted logs will be placed in the current working directory.

-v, --verbose

Increase output verbosity, the more times it is specified the more verbose the logging will be.

EXAMPLES

To redact a file called backup.log using ABCDEF as the salt.

$ cblogredaction -s ABCDEF backup.log

To redact two files called sdk-01.log and sdk-02.log using a generated salt and two threads.

$ cblogredaction -g -t 2 sdk-01.log sdk-02.log