Add configuration example for access log filePath
This commit is contained in:
parent
2a0760412c
commit
418cccd307
1 changed files with 14 additions and 4 deletions
|
@ -26,6 +26,20 @@ accessLog: {}
|
||||||
By default access logs are written to the standard output.
|
By default access logs are written to the standard output.
|
||||||
To write the logs into a log file, use the `filePath` option.
|
To write the logs into a log file, use the `filePath` option.
|
||||||
|
|
||||||
|
```toml tab="File (TOML)"
|
||||||
|
[accessLog]
|
||||||
|
filePath = "/path/to/access.log"
|
||||||
|
```
|
||||||
|
|
||||||
|
```yaml tab="File (YAML)"
|
||||||
|
accessLog:
|
||||||
|
filePath: "/path/to/access.log"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash tab="CLI"
|
||||||
|
--accesslog.filepath=/path/to/access.log
|
||||||
|
```
|
||||||
|
|
||||||
### `format`
|
### `format`
|
||||||
|
|
||||||
By default, logs are written using the Common Log Format (CLF).
|
By default, logs are written using the Common Log Format (CLF).
|
||||||
|
@ -60,7 +74,6 @@ accessLog:
|
||||||
|
|
||||||
```bash tab="CLI"
|
```bash tab="CLI"
|
||||||
# Configuring a buffer of 100 lines
|
# Configuring a buffer of 100 lines
|
||||||
--accesslog=true
|
|
||||||
--accesslog.filepath=/path/to/access.log
|
--accesslog.filepath=/path/to/access.log
|
||||||
--accesslog.bufferingsize=100
|
--accesslog.bufferingsize=100
|
||||||
```
|
```
|
||||||
|
@ -103,7 +116,6 @@ accessLog:
|
||||||
|
|
||||||
```bash tab="CLI"
|
```bash tab="CLI"
|
||||||
# Configuring Multiple Filters
|
# Configuring Multiple Filters
|
||||||
--accesslog=true
|
|
||||||
--accesslog.filepath=/path/to/access.log
|
--accesslog.filepath=/path/to/access.log
|
||||||
--accesslog.format=json
|
--accesslog.format=json
|
||||||
--accesslog.filters.statuscodes=200,300-302
|
--accesslog.filters.statuscodes=200,300-302
|
||||||
|
@ -163,7 +175,6 @@ accessLog:
|
||||||
|
|
||||||
```bash tab="CLI"
|
```bash tab="CLI"
|
||||||
# Limiting the Logs to Specific Fields
|
# Limiting the Logs to Specific Fields
|
||||||
--accesslog=true
|
|
||||||
--accesslog.filepath=/path/to/access.log
|
--accesslog.filepath=/path/to/access.log
|
||||||
--accesslog.format=json
|
--accesslog.format=json
|
||||||
--accesslog.fields.defaultmode=keep
|
--accesslog.fields.defaultmode=keep
|
||||||
|
@ -238,7 +249,6 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- TZ=US/Alaska
|
- TZ=US/Alaska
|
||||||
command:
|
command:
|
||||||
- --accesslog
|
|
||||||
- --accesslog.fields.names.StartUTC=drop
|
- --accesslog.fields.names.StartUTC=drop
|
||||||
- --providers.docker
|
- --providers.docker
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in a new issue