update : 2015.11.03
php.shukuma.com

검색:
 
 
Gets the level(s) currently being logged

MongoLog::getLevel

(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.

<?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";
}

?>

인수

이 함수는 인수가 없습니다.

반환값

Returns the level(s) currently being logged.