Why traefik doesn't output logfile?

I'm trying to set up traefik with docker-compose.
But, traefik doesn't output logfile.

My docker-compose.yml is here

    image: traefik:latest
    restart: unless-stopped
      - "--log.level=DEBUG"
      - "--accesslog=/var/log/access.log"
      - "--log=/var/log/traefik.log"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./traefik_log:/var/log"

./traefik_log/ directory is empty...
How to output logfile with docker-compose?
I need traefik logfile for investigate my traefik problems.


Default is to log to stdout. Visible with docker logs command. So --accesslog is enough usually.

To define a file for accesslog.

1 Like

Thank you for your advice.
My problem is solved.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.