Please wait while we load your page...
 

Announcements

PHP Manual :: MongoLog::getLevel



MongoLog::getCallback || MongoLog::getModule || MongoLog || PHP Manual

(PECL mongo >= 1.2.3)

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

Description

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.

<?php

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

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

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

?>

Parameters

This function has no parameters.

Return Values

Returns the level(s) currently being logged.



MongoLog::getCallback || MongoLog::getModule || MongoLog || PHP Manual
Live Chat Not Available