Reputation: 69
I dont want mongodb to log anything in mongod.log . Please let me know how to suppress the same as it is growing in size and occupy lot of space. I have tried with mongo.conf file but it looks there is no option to disable logs
Thanks
Upvotes: 5
Views: 22375
Reputation: 846
Not sure if this works or not send logs to /dev/null ?
systemLog:
destination: file
logAppend: true
logRotate: reopen
quiet: true
#path: /var/log/mongodb/mongod.log
path: /dev/null
or can also add to crontab ( empty file every 30 min )
*/30 * * * * cat /dev/null > /var/log/mongodb/mongod.log
Upvotes: 4
Reputation: 1
You could disable profilling in mongoDB or set a Profiling level .
More here http://docs.mongodb.org/manual/tutorial/manage-the-database-profiler/
Upvotes: 0
Reputation: 3356
1) db.adminCommand({setParameter:1, logLevel:0 }) // from mongo shell, this can be set using config file too
2) disable slow query profiling in config file
3) in config file, set, quiet = true
Upvotes: -3