Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking current mongodb logging level

Does anyone know how to check the logging level in mongodb? I see how to set it, but I'm not sure what the current setting on my server is.

like image 658
TristanMatthews Avatar asked Jun 10 '14 00:06

TristanMatthews


1 Answers

You can use the getParameter command:

> use admin;
> db.runCommand({getParameter: 1, logLevel: 1});
{ "logLevel" : 0, "ok" : 1 }

Note: as the docs say, it doesn't matter what the values are for those two keys. Or, as Stennie said in the comments, just:

> db.adminCommand({getParameter: 1, logLevel: 1});
{ "logLevel" : 0, "ok" : 1 }
like image 161
Tom Panning Avatar answered Sep 24 '22 08:09

Tom Panning