Skip to content

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

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 4 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 @@ -18,6 +18,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 @@ -52,6 +53,12 @@ cert-allowed-cn = ["dm"]

- 日志文件。如果不配置,日志会输出到标准输出中。

#### `redact-info-log` <span class="version-mark">从 v9.0.0 版本开始引入</span>

- 控制是否开启日志脱敏。该配置项值设为 `true` 时对 DM-worker 日志脱敏,隐藏 DM 查询参数的详细信息。具体使用方法参见 [DM-worker 组件日志脱敏](/log-redaction.md#dm-worker-组件日志脱敏)。
- 默认值:`false`
- 可选值:`false`、`true`

#### `worker-addr`

- DM-worker 服务的地址,可以省略 IP 信息,例如:`":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 @@ PD 侧的日志脱敏需要将 [`security.redact-info-log`](/pd-configuration-fi
## TiFlash 组件日志脱敏

TiFlash 侧的日志脱敏需要将 tiflash-server 中 [`security.redact_info_log`](/tiflash/tiflash-configuration.md#配置文件-tiflashtoml) 配置项的值以及 tiflash-learner 中 [`security.redact-info-log`](/tiflash/tiflash-configuration.md#配置文件-tiflash-learnertoml) 配置项的值均设为 `true` 或者 `"marker"`。两配置项默认值均为 `false`,即关闭脱敏。

## DM-worker 组件日志脱敏

DM-worker 侧的日志脱敏需要将 [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-从-v900-版本开始引入) 的值设为 `true`。该配置项值默认为 `false`,即关闭脱敏。