Php/docs/mongolog.setlevel

From Get docs

MongoLog::setLevel

(PECL mongo >= 1.2.3)

MongoLog::setLevelSets the level(s) to be logged


Description

public static MongoLog::setLevel ( int $level ) : void

This function can be used to control logging verbosity and the types of activities that should be logged. The MongoLog level constants may be used with bitwise operators to specify multiple levels.

<?php// first, specify a logging moduleMongoLog::setModule(MongoLog::CON);// log messages for every levelMongoLog::setLevel(MongoLog::ALL);// log warning and info messages onlyMongoLog::setLevel(MongoLog::WARNING|MongoLog::INFO);// log everything except fine activityMongoLog::setLevel(MongoLog::ALL & (~MongoLog::FINE));?>

Note that you must also call MongoLog::setModule() to specify which modules(s) of the driver should log.


Parameters

level
The level(s) you would like to log.