From 258d7201ebc6c01b71aa6a5e99eac3810e246e73 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Wed, 16 May 2018 15:03:18 -0700 Subject: [PATCH] CHANGELOG: discontinue "--log-outputs=default" support for zap logger Signed-off-by: Gyuho Lee --- CHANGELOG-3.4.md | 7 +++++-- CHANGELOG-3.5.md | 9 ++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG-3.4.md b/CHANGELOG-3.4.md index 12144978d..4ebed3a85 100644 --- a/CHANGELOG-3.4.md +++ b/CHANGELOG-3.4.md @@ -171,8 +171,11 @@ See [security doc](https://github.com/coreos/etcd/blob/master/Documentation/op-g - **`etcd --logger=capnslog` will be deprecated in v3.5**. - Main motivation is to promote automated etcd monitoring, rather than looking back server logs when it starts breaking. Future development will make etcd log as few as possible, and make etcd easier to monitor with metrics and alerts. - e.g. `--logger=capnslog --log-outputs=default` is the default setting and same as previous etcd server logging format. - - e.g. `--logger=zap --log-outputs=default` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to `os.Stderr`. - - e.g. If etcd parent process ID (`ppid`) is 1 (e.g. run with systemd), `--logger=zap --log-outputs=default` will [redirect server logs to local systemd journal](https://github.com/coreos/etcd/pull/9624) in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig). And if write to journald fails, it writes to `os.Stderr` as a fallback. + - e.g. `--logger=zap --log-outputs=default` is not supported when `--logger=zap`. + - Use `etcd --log-outputs=systemd/journal` to send logs to the local systemd journal. + - Previously, if etcd parent process ID (`ppid`) is 1 (e.g. run with systemd), `--logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback. + - However, even with `ppid` 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/coreos/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient. + - To avoid this problem, systemd journal logging must be configured manually. - e.g. `--logger=zap --log-outputs=stderr` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to `os.Stderr`. Use this to override journald log redirects. - e.g. `--logger=zap --log-outputs=stdout` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to `os.Stdout` Use this to override journald log redirects. - e.g. `--logger=zap --log-outputs=a.log` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to the specified file `a.log`. diff --git a/CHANGELOG-3.5.md b/CHANGELOG-3.5.md index ed9ba1557..4bc8d0bd0 100644 --- a/CHANGELOG-3.5.md +++ b/CHANGELOG-3.5.md @@ -13,7 +13,14 @@ See [code changes](https://github.com/coreos/etcd/compare/v3.4.0...v3.5.0) and [ - Deprecated [`/v3beta`](https://github.com/coreos/etcd/pull/9298). - `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead. - **`etcd --log-output` flag has been deprecated.** Use **`etcd --log-outputs`** instead. -- **`etcd --logger=capnslog` flag has been deprecated.** Now, **`etcd --logger=zap`** is the default. +- **`etcd --logger=zap`** is now the default. +- **`etcd --logger=capnslog` flag has been deprecated.** +- **`etcd --logger=zap --log-outputs=default` flag value is not supported.**. + - Use `etcd --log-outputs=systemd/journal` to send logs to the local systemd journal. + - Previously, if etcd parent process ID (`ppid`) is 1 (e.g. run with systemd), `--logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback. + - However, even with `ppid` 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/coreos/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient. + - To avoid this problem, systemd journal logging must be configured manually. +- **`etcd --log-outputs=stderr`** is now the default. - **`etcd --log-package-levels` flag for `capnslog` has been deprecated.** Now, **`etcd --logger=zap`** is the default. - **`[CLIENT-URL]/config/local/log` endpoint has been deprecated, as is `etcd --log-package-levels` flag.** - `curl http://127.0.0.1:2379/config/local/log -XPUT -d '{"Level":"DEBUG"}'` won't work.