Skip to content

Commit

Permalink
traefik: add toggle for file logging
Browse files Browse the repository at this point in the history
closes #231
  • Loading branch information
saltydk committed Jun 28, 2024
1 parent 1302654 commit ca12f1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions roles/traefik/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ traefik_metrics_domain: "{{ user.domain }}"
################################

traefik_log_level: "ERROR"
traefik_log_file: true
traefik_log_max_size: "10M"
traefik_log_max_backups: "3"
traefik_log_max_age: "3"
Expand Down Expand Up @@ -281,9 +282,10 @@ traefik_docker_commands_default:
- "--entrypoints.websecure.http.tls.certResolver={{ traefik_default_certresolver }}"
- "--api.dashboard=true"
- "--api=true"
- "--log=true"
- "--log.level={{ traefik_log_level }}"
- "--log.filepath=/etc/traefik/traefik.log"
- "{{ '--log.filepath=/etc/traefik/traefik.log' if traefik_log_file else omit }}"
- "{{ '--log.maxsize=' + traefik_log_max_size if traefik_log_file else omit }}"
- "{{ '--log.maxbackups=' + traefik_log_max_backups if traefik_log_file else omit }}"
- "--accesslog={{ traefik_access_log }}"
- "--accesslog.fields.names.StartUTC=drop"
- "--accesslog.fields.headers.names.User-Agent=keep"
Expand Down

0 comments on commit ca12f1c

Please sign in to comment.