Query: mongolog
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MONGOLOG(3) 1 MONGOLOG(3) The MongoLog classINTRODUCTIONLogging can be used to get detailed information about what the driver is doing. Logging is disabled by default, but this class allows you to activate specific levels of logging for various parts of the driver. Some examples: <?php // print every log message possible MongoLog::setLevel(MongoLog::ALL); // all log levels MongoLog::setModule(MongoLog::ALL); // all parts of the driver // print significant events about replica set failover MongoLog::setLevel(MongoLog::INFO); MongoLog::setModule(MongoLog::RS); // print info- and diagnostic-level events for replica sets and connections MongoLog::setLevel(MongoLog::INFO|MongoLog::FINE); MongoLog::setModule(MongoLog::RS|MongoLog::CON); ?> Note By default, MongoLog emits all log messages as PHP notices. Depending on the SAPI you use, messages may be sent to stderr (for CLI) or the web server's error log. If, after configuring MongoLog, log messages are not appearing as expected, ensure that the E_NOTICE bit is included in error_reporting and that display_errors is on.CLASS SYNOPSISMongoLog MongoLog Constants o const int$MongoLog::NONE0 o const int$MongoLog::ALL31 level constants o const int$MongoLog::WARNING1 o const int$MongoLog::INFO2 o const int$MongoLog::FINE4 module constants o const int$MongoLog::RS1 o const int$MongoLog::POOL1 o const int$MongoLog::CON2 o const int$MongoLog::IO4 o const int$MongoLog::SERVER8 o const int$MongoLog::PARSE16 Fields o privatestatic int$callback o privatestatic int$level o privatestatic int$module Methods o publicstatic callable MongoLog::getCallback (void ) o publicstatic int MongoLog::getLevel (void ) o publicstatic int MongoLog::getModule (void ) o publicstatic void MongoLog::setCallback (callable $log_function) o publicstatic void MongoLog::setLevel (int $level) o publicstatic void MongoLog::setModule (int $module)PREDEFINED CONSTANTSMONGOLOG CONSTANTSThese constants can be used by both MongoLog.setLevel(3) and MongoLog.setModule(3). o MongoLog::NONE - Log nothing. o MongoLog::ALL - Log everything.MONGOLOG LEVEL CONSTANTSThese constants can be used by MongoLog.setLevel(3). o MongoLog::WARNING - Log events that are somewhat exceptional, but not quite worthy of an actual exception (e.g. recoverable con- nection errors). o MongoLog::INFO - Log events that may be of interest to administrators, but are not particularly noteworthy (e.g. option parsing, authentication steps). o MongoLog::FINE - Log most events that the driver performs (e.g. server selection, socket communication). Depending on the module being logged, this can be extremely noisy and is primarily useful for debugging.MONGOLOG MODULE CONSTANTSThese constants can be used by MongoLog.setModule(3). o MongoLog::CON - Log connection activity. Creating new connections, authentication, pinging, timeouts, etc. o MongoLog::IO - Log traffic to/from the database. Unless your program is trivial, this will create an enormous number of log mes- sages. o MongoLog::PARSE - Log parsing of the connection string and options when constructing MongoClient. o MongoLog::POOL - Previously used to log connection pool activity. This option is now a deprecated alias of MongoLog::RS. o MongoLog::RS - Log replica set activity. Failovers, read preference selection, etc. o MongoLog::SERVER - Previously used to log server status changes. This option is deprecated in favor of MongoLog::RS.CHANGELOG+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 1.3.0 | | | | | | | Added MongoLog::CON and deprecated Mon- | | | goLog::POOL and MongoLog::SERVER. | | | | +--------+---------------------------------------------------+ PHP Documentation Group MONGOLOG(3)
Related Man Pages |
---|
sasl_log_t(3sasl) - opensolaris |
datetimezone(3) - php |
eventlistener(3) - php |
eventutil(3) - php |
mojo::log(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
PHP Logging Class 1.2 (Default branch) |
Making a Log of user activity in Solaris 10 |