Skip to content

Commit 60c517e

Browse files
author
mrmahi2003
committed
docs: add logging flags section
Signed-off-by: mrmahi2003 <maahirchauhan20@icloud.com>
1 parent 5d1816a commit 60c517e

1 file changed

Lines changed: 26 additions & 18 deletions

File tree

content/en/docs/v3.5/op-guide/configuration.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ You can configure etcd through the following:
1313
- **[Configuration file](#configuration-file)**
1414

1515
{{% alert color="warning" %}}
16-
<i class="fas fa-exclamation-triangle mr-1"></i> **Caution**: If you mix-and-match configuration options, then the following
16+
<**Caution**: If you mix-and-match configuration options, then the following
1717
rules apply.
1818

1919
- Command-line flags take precedence over environment variables.
@@ -30,7 +30,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
3030
**Note**: For details concerning new, updated, and deprecated {{< param version >}} flags,
3131
see [CHANGELOG-{{< psubstr version 1 >}}.md][changelog].
3232

33-
[changelog]: https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-{{< psubstr version 1 >}}.md
33+
[changelog]: <https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG>-{{< psubstr version 1 >}}.md
3434
{{% /alert %}}
3535

3636
### Member
@@ -83,6 +83,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
8383
--socket-reuse-address 'false'
8484
Enable to set socket option SO_REUSEADDR on listeners allowing binding to an address in TIME_WAIT state.
8585
```
86+
8687
### Clustering
8788

8889
```nocode
@@ -127,6 +128,22 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
127128
'write-only-drop-data' // Custom v2 state will get DELETED !
128129
'gone' // v2store is not maintained any longer. (planned default in v3.7)
129130
```
131+
132+
### Logging flags {#logging}
133+
134+
```nocode
135+
--logger 'zap'
136+
Currently only supports 'zap' for structured logging.
137+
--log-outputs 'default'
138+
Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd, or list of comma separated output targets.
139+
--log-level 'info'
140+
Configures log level. Only supports debug, info, warn, error, panic, or fatal.
141+
--enable-log-rotation 'false'
142+
Enable log rotation of a single log-outputs file target.
143+
--log-rotation-config-json '{"maxsize": 100, "maxage": 0, "maxbackups": 0, "localtime": false, "compress": false}'
144+
Configures log rotation if enabled with a JSON logger config. MaxSize(MB), MaxAge(days,0=no limit), MaxBackups(0=no limit), LocalTime(use computers local time), Compress(gzip)".
145+
```
146+
130147
### Security
131148

132149
```nocode
@@ -176,6 +193,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
176193
--tls-max-version ''
177194
Maximum TLS version supported by etcd (empty will be auto-populated by Go).
178195
```
196+
179197
### Auth
180198

181199
```nocode
@@ -186,6 +204,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
186204
--auth-token-ttl 300
187205
Time (in seconds) of the auth-token-ttl.
188206
```
207+
189208
### Profiling and monitoring
190209

191210
```nocode
@@ -196,20 +215,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
196215
--listen-metrics-urls ''
197216
List of URLs to listen on for the metrics and health endpoints.
198217
```
199-
### Logging
200218

201-
```nocode
202-
--logger 'zap'
203-
Currently only supports 'zap' for structured logging.
204-
--log-outputs 'default'
205-
Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd, or list of comma separated output targets.
206-
--log-level 'info'
207-
Configures log level. Only supports debug, info, warn, error, panic, or fatal.
208-
--enable-log-rotation 'false'
209-
Enable log rotation of a single log-outputs file target.
210-
--log-rotation-config-json '{"maxsize": 100, "maxage": 0, "maxbackups": 0, "localtime": false, "compress": false}'
211-
Configures log rotation if enabled with a JSON logger config. MaxSize(MB), MaxAge(days,0=no limit), MaxBackups(0=no limit), LocalTime(use computers local time), Compress(gzip)".
212-
```
213219
### Experimental distributed tracing
214220

215221
```nocode
@@ -224,13 +230,13 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
224230
--experimental-distributed-tracing-sampling-rate '0'
225231
Number of samples to collect per million spans for OpenTelemetry Tracing (if enabled with experimental-enable-distributed-tracing flag).
226232
```
233+
227234
### v2 Proxy
228235

229236
{{% alert color="warning" %}}
230-
**<i class="fas fa-exclamation-triangle mr-1"></i> Note**: flags will be deprecated in v3.6.
237+
**Note**: flags will be deprecated in v3.6.
231238
{{% /alert %}}
232239

233-
234240
```nocode
235241
--proxy 'off'
236242
Proxy mode setting ('off', 'readonly' or 'on').
@@ -245,6 +251,7 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
245251
--proxy-read-timeout 0
246252
Time (in milliseconds) for a read to timeout.
247253
```
254+
248255
### Experimental features
249256

250257
```nocode
@@ -269,10 +276,11 @@ The list of flags provided below may not be up-to-date due to ongoing developmen
269276
--experimental-bootstrap-defrag-threshold-megabytes
270277
Enable the defrag during etcd server bootstrap on condition that it will free at least the provided threshold of disk space. Needs to be set to non-zero value to take effect.
271278
```
279+
272280
### Unsafe features
273281

274282
{{% alert color="warning" %}}
275-
**<i class="fas fa-exclamation-triangle mr-1"></i> Warning**: using unsafe features may break the guarantees given by the consensus protocol!
283+
**Warning**: using unsafe features may break the guarantees given by the consensus protocol!
276284
{{% /alert %}}
277285

278286
```nocode

0 commit comments

Comments
 (0)