Skip to content

dm: add log redaction configuration item in dm worker log file #20663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dm/dm-worker-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ name = "worker1"
# Log configuration.
log-level = "info"
log-file = "dm-worker.log"
redact-info-log = false

# DM-worker listen address.
worker-addr = ":8262"
Expand Down Expand Up @@ -53,6 +54,12 @@ cert-allowed-cn = ["dm"]

- Specifies the log file directory. If this parameter is not specified, the logs are printed onto the standard output.

### `redact-info-log` <span class="version-mark">New in v9.0.0</span>

- Controls whether to enable log redaction. When this configuration item is set to `true`, DM-worker logs are redacted to hide detailed DM query arguments. For more information, see [DM-worker Log Redaction](/log-redaction.md#log-redaction-in-DM-worker-side).
- Default value: `false`
- Value options: `false`, `true`

#### `worker-addr`

- Specifies the address of DM-worker which provides services. You can omit the IP address and specify the port number only, such as `":8262"`.
Expand Down
4 changes: 4 additions & 0 deletions log-redaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ To enable log redaction in the PD side, set the value of [`security.redact-info-
## Log redaction in TiFlash side

To enable log redaction in the TiFlash side, set both the [`security.redact_info_log`](/tiflash/tiflash-configuration.md#configure-the-tiflashtoml-file) value in tiflash-server and the [`security.redact-info-log`](/tiflash/tiflash-configuration.md#configure-the-tiflash-learnertoml-file) value in tiflash-learner to `true` or `"marker"`. Both configuration values default to `false`, which means that log redaction is disabled.

## Log redaction in DM-worker side

To enable log redaction in the DM-worker side, set the value of [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-new-in-v900) to `true`. This configuration value defaults to `false`, which means that log redaction is disabled.