Stdout logs not showing up at all

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

 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

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

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

Did you try to restart Docker or the host?

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

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