Skip to content

Commit feea8fd

Browse files
authored
dm: add log redaction configuration item in dm worker log file (#20133)
1 parent 5676f99 commit feea8fd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

dm/dm-worker-configuration-file.md

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ name = "worker1"
1818
# Log configuration.
1919
log-level = "info"
2020
log-file = "dm-worker.log"
21+
redact-info-log = false
2122

2223
# DM-worker listen address.
2324
worker-addr = ":8262"
@@ -52,6 +53,12 @@ cert-allowed-cn = ["dm"]
5253

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

56+
#### `redact-info-log` <span class="version-mark">从 v9.0.0 版本开始引入</span>
57+
58+
- 控制是否开启日志脱敏。该配置项值设为 `true` 时对 DM-worker 日志脱敏,隐藏 DM 查询参数的详细信息。具体使用方法参见 [DM-worker 组件日志脱敏](/log-redaction.md#dm-worker-组件日志脱敏)
59+
- 默认值:`false`
60+
- 可选值:`false``true`
61+
5562
#### `worker-addr`
5663

5764
- DM-worker 服务的地址,可以省略 IP 信息,例如:`":8262"`

log-redaction.md

+4
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,7 @@ PD 侧的日志脱敏需要将 [`security.redact-info-log`](/pd-configuration-fi
7070
## TiFlash 组件日志脱敏
7171

7272
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`,即关闭脱敏。
73+
74+
## DM-worker 组件日志脱敏
75+
76+
DM-worker 侧的日志脱敏需要将 [`log.redact-info-log`](/dm/dm-worker-configuration-file.md#redact-info-log-从-v900-版本开始引入) 的值设为 `true`。该配置项值默认为 `false`,即关闭脱敏。

0 commit comments

Comments
 (0)