Reputation: 457
I am starting to use Mongodb to storage my data, and when I started the service, I am getting a log flood, I want to turn off this log saves, I don't mind if I do not have any kind of logs, it is development environment and need to do that, because my log file is growing more than 30gb by 2 or 3 days.
I've tried to change quiet to true as below, but with no success.
root@master:~# cat /etc/mongod.conf
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
verbosity: 0
destination: file
logAppend: true
###### HERE ######
quiet: true
path: /var/log/mongodb/mongod.log
# path: /dev/null
component:
accessControl:
verbosity: 1
command:
verbosity: 1
Any idea how to get a clean logs?? could be a logs with nothing.
Thank you!!
Upvotes: 0
Views: 557
Reputation: 1798
Mongo logs have a number of verbosity levels from 0 to 5.
Wherever you are setting verbosity as 1, set it to 0.
You should check the log levels defined using -
db.getLogComponents()
This would give you the set log levels which you can modify to 0 and see if the logging changes.
db.setLogLevel(<verbosity>, <component>)
Where component can be one of - accessControl
, command
, control
, geo
, index
, network
, query
, replication
, storage
, journal
, write
.
Upvotes: 3