merged branch Tobion/monolog-logger (PR #8040)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #8040).

Discussion
----------

[Monolog] fix logger in regards to DebugLoggerInterface

Commits
-------

438f75c [Monolog] fix logger in regards to DebugLoggerInterface
This commit is contained in:
Fabien Potencier 2013-05-24 15:05:34 +02:00
commit 8121dbb770
1 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,8 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
if ($logger = $this->getDebugLogger()) {
return $logger->getLogs();
}
return array();
}
/**
@ -72,12 +74,14 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
if ($logger = $this->getDebugLogger()) {
return $logger->countErrors();
}
return 0;
}
/**
* Returns a DebugLoggerInterface instance if one is registered with this logger.
*
* @return DebugLoggerInterface A DebugLoggerInterface instance or null if none is registered
* @return DebugLoggerInterface|null A DebugLoggerInterface instance or null if none is registered
*/
private function getDebugLogger()
{