cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

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

Open drmaples opened this issue 1 year ago • 5 comments

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.

drmaples avatar Jul 25 '23 19:07 drmaples

👍 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 🚀 🚀

JoupainMD avatar Oct 10 '23 15:10 JoupainMD

any news on this issue ?

nlamirault avatar Jun 03 '24 12:06 nlamirault

I'm also highly interested in this.

ruudvanderweijde avatar Jun 26 '24 07:06 ruudvanderweijde