- PHP 手册
- 函数参考
- 数据库扩展
- 针对各数据库系统对应的扩展
- Mongo
- Miscellaneous
- MongoLog
MongoLog::getLevel
(PECL mongo >= 1.2.3)
MongoLog::getLevel — Gets the level(s) currently being logged
说明
public static MongoLog::getLevel ( void ) : intThis 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.
User Contributed Notes
There are no user contributed notes for this page.官方地址:https://www.php.net/manual/en/mongolog.getlevel.php