# Stdout logs not showing up at all

**URL:** <https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279>\
**Category:** Traefik v3 (latest)\
**Tags:** file, cli, docker\
**Created:** [September 3, 2024, 5:51am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279 "2024-09-03T05:51:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![xd003](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/xd003/32/7571_2.png) [@xd003](https://community.traefik.io/u/xd003)\
**Post date:** [September 3, 2024, 5:51am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/1 "2024-09-03T05:51:36Z")

</div>

I am using the following docker compose for my traefik docker container

```auto
 traefik:
  image: traefik:v3.1.2
  container_name: traefik
  restart: unless-stopped
  command:
    - --global.sendanonymoususage=false
    - --api=true
    - --entrypoints.web.address=:80
    - --entrypoints.web.http.redirections.entrypoint.to=websecure
    - --entrypoints.web.http.redirections.entrypoint.scheme=https
    - --entrypoints.web.http.redirections.entrypoint.permanent=true
    - --entrypoints.websecure.address=:443
    - --entrypoints.websecure.asDefault=true
    - --entrypoints.websecure.http.tls=true
    - --providers.docker=true
    - --providers.docker.exposedbydefault=false
    - --providers.file.filename=/traefik/config.toml
    - --log.level=DEBUG
  ports:
    - 80:80
    - 443:443
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /etc/letsencrypt:/etc/letsencrypt
    - /opt/containers/traefik:/traefik
  labels:
    - traefik.enable=true
    - traefik.http.routers.traefik.rule=Host(`traefik.domain.tld`)
    - traefik.http.routers.traefik.service=api@internal
    - traefik.http.routers.traefik.middlewares=authtraefik
    - traefik.http.middlewares.authtraefik.basicauth.users=user:pass

```

I can access the traefik dashboard, all the other docker container's reverse proxy is also working fine but for some weird reason, the stdout log just shows up empty for some reason. I have restarted traefik docker container many times but to no avail

`❯ docker compose logs -f traefik` produces literally nothing

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [September 3, 2024, 8:55am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/2 "2024-09-03T08:55:27Z")

</div>

> [@xd003](#):
>
> `--log.level=DEBUG`

The above seems correct.

But it seems strange that you can access the dashboard without `--api.dashboard=true`.

So is this the right compose file you used to start the service? You are in the right folder?

* * *

UPDATE: never mind

> `dashboard`  
> _Optional, Default=true_

---

<div class="post-metadata">

**Author:** ![xd003](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/xd003/32/7571_2.png) [@xd003](https://community.traefik.io/u/xd003)\
**Post date:** [September 3, 2024, 8:59am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/3 "2024-09-03T08:59:30Z")

</div>

Yes, this is the very exact docker compose i used to start the traefik container. For some more context, it all working fine earlier. i had to make some change in my config.toml file to add a new router and service but it caused some error so i reverted that change and restarted traefik container but the logs would just not show up now

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [September 3, 2024, 9:16am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/4 "2024-09-03T09:16:34Z")

</div>

Did you try to restart Docker or the host?

---

<div class="post-metadata">

**Author:** ![xd003](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/xd003/32/7571_2.png) [@xd003](https://community.traefik.io/u/xd003)\
**Post date:** [September 3, 2024, 9:49am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/5 "2024-09-03T09:49:10Z")

</div>

I have tried restarting docker & my host as well but didn't helped

Edit - It gave me these errors on my host restart randomly. All of my container's reverse proxy + traefik dashboard still works fine, just stdout log is always empty and these errors show up once in a while

```auto
traefik | 2024-09-03T09:40:22Z ERR error="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik | 2024-09-03T09:40:22Z ERR Error while starting server error="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik | 2024-09-03T09:40:22Z ERR error="accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik | 2024-09-03T09:40:22Z ERR Error while starting server error="accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik | 2024-09-03T09:40:23Z ERR Failed to list containers for docker error="Get \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json\": context canceled" providerName=docker
traefik | 2024-09-03T09:47:34Z ERR error="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik | 2024-09-03T09:47:34Z ERR error="close tcp [::]:443: use of closed network connection" entryPointName=websecure
traefik | 2024-09-03T09:47:34Z ERR error="accept tcp [::]:80: use of closed network connection" entryPointName=web
traefik | 2024-09-03T09:47:34Z ERR error="close tcp [::]:80: use of closed network connection" entryPointName=web

```

---

<div class="post-metadata">

**Author:** ![vitalessandro](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vitalessandro](https://community.traefik.io/u/vitalessandro)\
**Post date:** [March 26, 2025, 9:48pm UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/6 "2025-03-26T21:48:32Z")

</div>

Hi @xd003

I'm encountering the same issue. I had misconfigured the mounted logs directory, accidentally saving them to /etc/traefik in the container. Before realizing my error, I was messing around with the logs settings in traefik.yml, switching between ERROR / INFO logs and trying to get traefik to save the output logs on the mapping of my host.

After one of the container reboots, traefik just stopped printing logs to docker. I'm getting the same error you got after rebooting.

Did you ever find the reason or a fix for your issue?

Edit: My log configuration in traefik.yml is the following:

```auto
log:
  level: "DEBUG"
  filePath: "/var/log/traefik/traefik.log"

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [March 27, 2025, 6:15am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/7 "2025-03-27T06:15:09Z")

</div>

What OS, how did you install Docker, what do your bind mounts look like?

---

<div class="post-metadata">

**Author:** ![vitalessandro](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vitalessandro](https://community.traefik.io/u/vitalessandro)\
**Post date:** [March 31, 2025, 1:27pm UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/8 "2025-03-31T13:27:58Z")

</div>

OS is Ubuntu running on an ARM VPS. Docker was installed using the apt repository. Log output was working fine, until I tried fixing the wrong bind mounts for the log files that I had set in the docker compose file.

Bind mounts are:

```auto
volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro ## needed without docker socket proxy
      - ./traefik/traefik.yml:/etc/traefik/traefik.yml:ro
      - ./traefik/config.yml:/etc/traefik/config.yml:ro
      - ../../data/traefik/acme:/etc/traefik/acme
      - ../../data/traefik/logs:/var/log/traefik

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [April 1, 2025, 4:37pm UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/9 "2025-04-01T16:37:54Z")

</div>

Are you using Docker Swarm?

---

<div class="post-metadata">

**Author:** ![vitalessandro](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vitalessandro](https://community.traefik.io/u/vitalessandro)\
**Post date:** [April 1, 2025, 5:45pm UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/10 "2025-04-01T17:45:06Z")

</div>

no, using docker compose on a single host

---

<div class="post-metadata">

**Author:** ![vitalessandro](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@vitalessandro](https://community.traefik.io/u/vitalessandro)\
**Post date:** [April 7, 2025, 7:13pm UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/11 "2025-04-07T19:13:16Z")

</div>

After updating my main docker host to traefik v3.3, I have a similar issue there as well. When I try to `docker logs traefik`, I get the error `Failed to write to log, write /etc/traefik/logs/access.log: file already closed`.

Traefik seems to be writing logs to access.log and traefik.log without an issue though. Not being able to query the logs from docker breaks all of my monitoring setup through promtail/loki/grafana though

---

<div class="post-metadata">

**Author:** ![edu-mar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/edu-mar/32/10373_2.png) [@edu-mar](https://community.traefik.io/u/edu-mar)\
**Post date:** [May 15, 2025, 7:00am UTC](https://community.traefik.io/t/stdout-logs-not-showing-up-at-all/24279/12 "2025-05-15T07:00:09Z")

</div>

I was unable to replicate the issue by following the instructions.  
I was able to get logs by running the docker command. Probably is outside docker, can you review if dockerd has propper access to the folder that you are trying to write?
