cloudflare / cloudflare/cloudflared

💡add `--log-format` option for tunnel logs

Open
#1,033 9 comments 31 reactions 0 assignees View on GitHub
Priority: Normal Type: Feature Request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.