Skip to content

Commit

Permalink
feat: make logging to stdout configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelScofield committed Dec 26, 2023
1 parent 2d1627c commit 5a1f320
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/v0.4/en/user-guide/operations/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,15 @@ level = "info"
enable_otlp_tracing = false
otlp_endpoint = "localhost:4317"
tracing_sample_ratio = 1.0
append_stdout = true
```

- `dir`: log output directory.
- `level`: output log level, available log level are `info`, `debug`, `error`, `warn`, the default level is `info`.
- `enable_otlp_tracing`: whether to turn on distributed tracing, not turned on by default.
- `otlp_endpoint`: Export the target endpoint of tracing using gRPC-based OTLP protocol, the default value is `localhost:4317`.
- `tracing_sample_ratio`: The percentage of sampling tracing, the value range is `[0,1]`, the default value is 1, which means sampling all tracing.
- `append_stdout`: Whether to append logs to stdout. Defaults to `true`.

How to use distributed tracing, please reference [Tracing](./tracing.md)

Expand Down
2 changes: 2 additions & 0 deletions docs/v0.4/zh/user-guide/operations/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,15 @@ level = "info"
enable_otlp_tracing = false
otlp_endpoint = "localhost:4317"
tracing_sample_ratio = 1.0
append_stdout = true
```

- `dir`: log 输出目录。
- `level`: log 输出的日志等级,日志等级有 `info`, `debug`, `error`, `warn`,默认等级为 `info`
- `enable_otlp_tracing`:是否打开分布式追踪,默认不开启。
- `otlp_endpoint`:使用基于 gRPC 的 OTLP 协议导出 tracing 的目标端点,默认值为 `localhost:4317`
- `tracing_sample_ratio`: 采样 tracing 的百分比,取值范围 `[0,1]`,默认值为 1,代表采样所有的 tracing。
- `append_stdout`:是否将日志打印到stdout。默认是`true`

如何使用分布式追踪,请参考 [Tracing](./tracing.md)

Expand Down

0 comments on commit 5a1f320

Please sign in to comment.