Seldaek/monolog — pull request #50 by rafacouto (2011-12-29 08:35:14+00:00)
Title: Functions to disable temporarily the logging.

```php
/**
* @return boolean Returns true when logging is currently enabled.
*/
public function isEnabled()

/**
* @param boolean $enable Enable (true) or disable (false) the logging.
*/
public function setEnabled($enable)
```

It might be useful within controled loops when a suboperation makes logging and you could not deactivate it. For example:

```php
// logger as a symfony container
$this->Logger = $this->getContainer()->get('logger');

// ...

// a very intensive controlled loop
while ($quantity-- > 0) {
$this->Logger->setEnabled(false);
$this->LabelRepository->createLabel($serial);
$this->Logger->setEnabled(true);
}
```