cloudflared
cloudflared copied to clipboard
💡add `--log-format` option for tunnel logs
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 friendlytext
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.
👍 it would be really nice to have a feature like this. And also, it would be nice to have some kind of access logs, DEBUG is really too verbose and INFO is really quiet. The best would be to be able to customize the log format (in the way nginx is doing for example, https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format)
In json also it will be 🚀 🚀
any news on this issue ?
I'm also highly interested in this.