setLogLevel(level, component?)
This method sets a single verbosity level for log messages.
Omit the <component> parameter to set the default verbosity for all components; i.e. the systemLog.verbosity setting. The operation sets the default verbosity to 1:
Syntax:
db.setLogLevel(level, component?)
Example
MongoDB
db.setLogLevel(1)
Output:
{"was" : {"verbosity" : 0,"accessControl" : {"verbosity" : -1},"command" : {"verbosity" : -1},"control" : {"verbosity" : -1},"executor" : {"verbosity" : -1},"geo" : {"verbosity" : -1},"index" : {"verbosity" : -1},"network" : {"verbosity" : -1,"asio" : {"verbosity" : -1},"bridge" : {"verbosity" : -1},"connectionPool" : {"verbosity" : -1}},"query" : {"verbosity" : -1},"replication" : {"verbosity" : -1,"election" : {"verbosity" : -1},"heartbeats" : {"verbosity" : -1},"initialSync" : {"verbosity" : -1},"rollback" : {"verbosity" : -1}},"sharding" : {"verbosity" : -1,"rangeDeleter" : {"verbosity" : -1},"shardingCatalogRefresh" : {"verbosity" : -1},"migration" : {"verbosity" : -1},"reshard" : {"verbosity" : -1},"migrationPerf" : {"verbosity" : -1}},"storage" : {"verbosity" : -1,"recovery" : {"verbosity" : -1},"journal" : {"verbosity" : -1}},"write" : {"verbosity" : -1},"ftdc" : {"verbosity" : -1},"tracking" : {"verbosity" : -1},"transaction" : {"verbosity" : -1},"tenantMigration" : {"verbosity" : -1},"test" : {"verbosity" : -1}},"ok" : 1}
No comments:
Post a Comment