6

How can I disable logs in MongoDB? I'm using a container, and trying to hide the logs using the following code in docker-compose.yml

mongodb:
  image: mongo
  logging:
    driver: "none"

I tried without quotes but it doesn't work.

mikemaccana
  • 110,530
  • 99
  • 389
  • 494
cabanesdev
  • 88
  • 5

1 Answers1

8

Well, I have been following this thread I've omitted the whole log and it's much better in my case:

mongo:
    command: mongod --quiet --logpath /dev/null