grafana / dskit

Distributed systems kit
Apache License 2.0
475 stars 68 forks source link

etcd client set log #230

Open jicanghaixb opened 2 years ago

jicanghaixb commented 2 years ago

etcd client can't config log, which causes log output by the etcd client to be on the stderr,This may cause sigpipe problems when cooperating with systemd. Whether the function of log can be configured?

zalegrala commented 2 years ago

Do you have an example log from the etcd client, or an error that was produced by trying to configure the etcd logging?

jicanghaixb commented 1 year ago

If there is an error during the running of the etcd client, etcd client will output log . By default, the log will be output to stderr. If the program is managed by systemd, the information about stderr and stdout will be captured by systemd-journald. If systemd-journald restarts, etcd client write log at this time, it will get a boken pipe error. In Golang, a SIGPIPE signal will be generated for this situation, which will cause the program killed by SIGPIPE