GoLang MongoLog::getLevel

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

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

PHP MongoLog::getLevel

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


(PECL mongo >= 1.2.3)

MongoLog::getLevelGets the level(s) currently being logged


public static int MongoLog::getLevel ( void )

This function can be used to see which log levels are currently enabled. The returned integer may be compared with the MongoLog level constants using bitwise operators to check for specific log levels.


if (MongoLog::getLevel() & MongoLog::FINE) {
"lots of logs\n";

if (
MongoLog::getLevel() ^ MongoLog::NONE) {
"logging, at least a little\n";

if (
MongoLog::getLevel() == MongoLog::ALL) {
"logging at the highest levels\n";



This function has no parameters.

Return Values

Returns the level(s) currently being logged.