From 418cccd307484b9da47ed6200f1b053deab0cc02 Mon Sep 17 00:00:00 2001 From: Frederic Werner <20406381+wernerfred@users.noreply.github.com> Date: Mon, 14 Dec 2020 12:34:05 +0100 Subject: [PATCH] Add configuration example for access log filePath --- docs/content/observability/access-logs.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/content/observability/access-logs.md b/docs/content/observability/access-logs.md index 502123917..829be2a4f 100644 --- a/docs/content/observability/access-logs.md +++ b/docs/content/observability/access-logs.md @@ -26,6 +26,20 @@ accessLog: {} By default access logs are written to the standard output. 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` By default, logs are written using the Common Log Format (CLF). @@ -60,7 +74,6 @@ accessLog: ```bash tab="CLI" # Configuring a buffer of 100 lines ---accesslog=true --accesslog.filepath=/path/to/access.log --accesslog.bufferingsize=100 ``` @@ -103,7 +116,6 @@ accessLog: ```bash tab="CLI" # Configuring Multiple Filters ---accesslog=true --accesslog.filepath=/path/to/access.log --accesslog.format=json --accesslog.filters.statuscodes=200,300-302 @@ -163,7 +175,6 @@ accessLog: ```bash tab="CLI" # Limiting the Logs to Specific Fields ---accesslog=true --accesslog.filepath=/path/to/access.log --accesslog.format=json --accesslog.fields.defaultmode=keep @@ -238,7 +249,6 @@ services: environment: - TZ=US/Alaska command: - - --accesslog - --accesslog.fields.names.StartUTC=drop - --providers.docker ports: