GoLang MongoLog::getModule

request it (200)
GoLang replacement for PHP's MongoLog::getModule [edit | history]

Do you know a GoLang replacement for PHP's MongoLog::getModule? Write it!

PHP MongoLog::getModule

PHP original manual for MongoLog::getModule [ show | php.net ]


(PECL mongo >= 1.2.3)

MongoLog::getModuleGets the module(s) currently being logged


public static int MongoLog::getModule ( void )

This function can be used to see which driver modules are currently being logged. The returned integer may be compared with the MongoLog module constants using bitwise operators to check if specific modules are being logged.


if (MongoLog::getModule() & MongoLog::RS) {
"logging replica sets\n";

if (
MongoLog::getModule() ^ MongoLog::NONE) {
"logging something\n";

if ((
MongoLog::getModule() & MongoLog::IO) == 0) {
"not logging io\n";



This function has no parameters.

Return Values

Returns the module(s) currently being logged.