Update access-logs.md, add examples for accesslog.format

This commit is contained in:
bluepuma77 2024-11-18 11:58:04 +01:00 committed by GitHub
parent 5658c8ac06
commit 6baa110adb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,6 +59,20 @@ If the given format is unsupported, the default (CLF) is used instead.
<remote_IP_address> - <client_user_name_if_available> [<timestamp>] "<request_method> <request_path> <request_protocol>" <HTTP_status> <content-length> "<request_referrer>" "<request_user_agent>" <number_of_requests_received_since_Traefik_started> "<Traefik_router_name>" "<Traefik_server_URL>" <request_duration_in_ms>ms <remote_IP_address> - <client_user_name_if_available> [<timestamp>] "<request_method> <request_path> <request_protocol>" <HTTP_status> <content-length> "<request_referrer>" "<request_user_agent>" <number_of_requests_received_since_Traefik_started> "<Traefik_router_name>" "<Traefik_server_URL>" <request_duration_in_ms>ms
``` ```
```yaml tab="File (YAML)"
accessLog:
format: "json"
```
```toml tab="File (TOML)"
[accessLog]
format = "json"
```
```bash tab="CLI"
--accesslog.format=json
```
### `bufferingSize` ### `bufferingSize`
To write the logs in an asynchronous fashion, specify a `bufferingSize` option. To write the logs in an asynchronous fashion, specify a `bufferingSize` option.