Home > database >  Disable logging for one docker container v2.3.3
Disable logging for one docker container v2.3.3

Time:10-12

I am running docker compose version 2.3.3, I am attempting to disable logging for a single container. Ive tried using:

logging:
    driver: none

However logs for my application still show up within the terminal. I have also tried the --attach option but that doesnt seem available.

CodePudding user response:

Have you tried running the container in detached mode? I.e. - docker compose up -d or docker compose up --detach.

CodePudding user response:

setting the logging driver changes where docker persists captured logs to, and consequently the availability of logs to docker logs / docker compose logs commands. Its not going to inhibit stdout/err in the container itself. If you need to quash that, given you have a net core app, you need to edit the LogLevel in appsettings.json to be less verbose. "Warning", or "Error" perhaps.

  • Related