cloudflare / cloudflare/cloudflared
💡add `--log-format` option for tunnel logs
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
The default console output is human friendly text format however the `--logfile` format is json. When running `cloudflared` via kubernetes/docker it is nice to have structured logging output to stdout or stderr for consumption by a central logging system like datadog.
It would be useful to add a `--log-format` option that defaults to human friendly`text` output (current behavior) but can log to `json` format if configured.
`--log-format value Console log output format {text, json}. (default: "text")`
**Describe alternatives you've considered**
Using `--logfile` is not an option as the default console logger's output is text format and is what is captured by `kubectl logs`
**Additional context**
`--logfile` and `--log-directory` are already options, `--log-format` would allow for complete configuration.
Contributor guide
Assessment
This issue has not been assessed yet.