GoLang MongoLog::setModule

request it (319)
GoLang replacement for PHP's MongoLog::setModule [edit | history]



Do you know a GoLang replacement for PHP's MongoLog::setModule? Write it!

PHP MongoLog::setModule

PHP original manual for MongoLog::setModule [ show | php.net ]

MongoLog::setModule

(PECL mongo >= 1.2.3)

MongoLog::setModuleSets the module(s) to be logged

Description

public static void MongoLog::setModule ( int $module )

This function can be used to set which driver modules should be logged. The MongoLog module constants may be used with bitwise operators to specify multiple modules.

<?php

// first, specify a logging level
MongoLog::setLevel(MongoLog::ALL);

// log replica set activity
MongoLog::setModule(MongoLog::RS);

// log replica sets and connection activity
MongoLog::setModule(MongoLog::RS|MongoLog::CON);

// log everything except IO activity
MongoLog::setModule(MongoLog::ALL & (~MongoLog::IO));

?>

Note that you must also call MongoLog::setLevel() to enable logging.

Parameters

module

The module(s) you would like to log.