Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB Log Levels

Tags:

mongodb

In mongodb you can set the log level to between 0 and 5. I was wondering what the general behavior of each of these levels was and what level it should be set at to keep from logging inserts. Its annoying to go through a log when you get around 600ips.

like image 205
Hersha Avatar asked Aug 09 '26 12:08

Hersha


2 Answers

Actually this is probably a function of the --slowms setting rather than the logging level - the default is 100ms. Increase that and the number of logged inserts should decrease. It's discussed, with examples, here:

http://www.mongodb.org/display/DOCS/Database+Profiler#DatabaseProfiler-EnablingProfiling

like image 186
Adam Comerford Avatar answered Aug 15 '26 01:08

Adam Comerford


Well I think I solved it. Even though mongodb was reporting a log level of 0 it apparently wasnt. When I started playing with the log levels I tried various number to look for changes in the log. But when I set it back to 0 it stopped logging the inserts.

like image 29
Hersha Avatar answered Aug 14 '26 23:08

Hersha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!