From f74526a36e57eaeb28936288929198232672f764 Mon Sep 17 00:00:00 2001 From: Dan Fredell Date: Mon, 1 Oct 2018 11:54:04 -0500 Subject: [PATCH] Document the default accessLog format --- docs/configuration/logs.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/configuration/logs.md b/docs/configuration/logs.md index 06f955fbe..4b9d4a9f2 100644 --- a/docs/configuration/logs.md +++ b/docs/configuration/logs.md @@ -60,12 +60,14 @@ For more information about the CLI, see the documentation about [Traefik command By default the Traefik log is written to stdout in text format. To write the logs into a log file specify the `filePath`: + ```toml [traefikLog] filePath = "/path/to/traefik.log" ``` To write JSON format logs, specify `json` as the format: + ```toml [traefikLog] filePath = "/path/to/traefik.log" @@ -90,6 +92,7 @@ traefikLogsFile = "log/traefik.log" ``` To customize the log level: + ```toml # Log level # @@ -109,17 +112,20 @@ Access logs are written when `[accessLog]` is defined. By default it will write to stdout and produce logs in the textual Common Log Format (CLF), extended with additional fields. To enable access logs using the default settings just add the `[accessLog]` entry: + ```toml [accessLog] ``` To write the logs into a log file specify the `filePath`: + ```toml [accessLog] filePath = "/path/to/access.log" ``` To write JSON format logs, specify `json` as the format: + ```toml [accessLog] filePath = "/path/to/access.log" @@ -127,6 +133,7 @@ format = "json" ``` To write the logs in async, specify `bufferingSize` as the format (must be >0): + ```toml [accessLog] filePath = "/path/to/access.log" @@ -141,6 +148,7 @@ bufferingSize = 100 ``` To filter logs you can specify a set of filters which are logically "OR-connected". Thus, specifying multiple filters will keep more access logs than specifying only one: + ```toml [accessLog] filePath = "/path/to/access.log" @@ -171,6 +179,7 @@ format = "json" ``` To customize logs format: + ```toml [accessLog] filePath = "/path/to/access.log" @@ -218,7 +227,8 @@ format = "json" # ... ``` -#### List of all available fields + +### List of all available fields ```ini StartUTC @@ -266,6 +276,15 @@ Deprecated way (before 1.4): accessLogsFile = "log/access.log" ``` +### CLF - Common Log Format + +By default, Træfik use the CLF (`common`) as access log format. + +```html + - [] " " "" "" "" "" ms +``` + + ## Log Rotation Traefik will close and reopen its log files, assuming they're configured, on receipt of a USR1 signal.