From 3a0455e5772c13e6b92689f08347c1e7d777f0bc Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 28 Mar 2022 11:03:23 +0200 Subject: [PATCH] Log headers for easier debug and fix timezone --- docker-compose.yml | 3 ++- traefik.toml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 58b064a..a707b7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,11 +12,12 @@ services: - 80:80 - 443:443 volumes: - - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock - ./traefik.toml:/traefik.toml - ./traefik_dynamic.toml:/traefik_dynamic.toml - /DATA/docker/traefik/certs:/certs + environment: + TZ: Europe/Paris labels: traefik.http.routers.traefik-metrics.entrypoints: websecure traefik.http.routers.traefik-metrics.rule: "Host(`${SERVER_NAME}`) && PathPrefix(`/metrics`)" diff --git a/traefik.toml b/traefik.toml index 501c5e2..8c5beb5 100644 --- a/traefik.toml +++ b/traefik.toml @@ -33,6 +33,13 @@ level = "INFO" [accessLog] + format = "json" + [accessLog.fields.headers] + defaultMode = "keep" + # See https://doc.traefik.io/traefik/observability/access-logs/#time-zones + [accessLog.fields.names] + "StartUTC" = "drop" + "ClientUsername" = "drop" [certificatesResolvers] [certificatesResolvers.letsencrypt]