merged branch Seldaek/monologbridge (PR #5297)
Commits -------e49afde
Update monolog compatibility832f8dd
Add support for Monolog 1.2.0 Discussion ---------- Add support for Monolog 1.2.0 It's BC just in case someone still uses an older monolog version --------------------------------------------------------------------------- by stloyd at 2012-08-19T07:20:24Z IMO you should update `composer.json` too. --------------------------------------------------------------------------- by Seldaek at 2012-08-19T07:36:51Z 1.* is still ok I think. Obviously the latest version is better, and if you update composer will pick the latest, but I don't think we need to force people to upgrade if there is no BC break. --------------------------------------------------------------------------- by stloyd at 2012-08-19T07:46:31Z But adding support for version `1.2` without changing `composer.json` which actually is: `>=1.0,<1.2-dev` is useless IMO. --------------------------------------------------------------------------- by Seldaek at 2012-08-19T07:50:16Z Where do you see `>=1.0,<1.2-dev`? --------------------------------------------------------------------------- by stloyd at 2012-08-19T07:55:36Z Here, in `2.0` branch: https://github.com/symfony/symfony/blob/2.0/composer.json#L21 --------------------------------------------------------------------------- by Seldaek at 2012-08-19T07:58:28Z Ok fixed.. Everywhere else in the master branch it is required with `1.*` so I didn't get what you meant :)
This commit is contained in:
commit
07d108af5e
@ -18,7 +18,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
"doctrine/common": ">=2.1,<2.3-dev",
|
"doctrine/common": ">=2.1,<2.3-dev",
|
||||||
"monolog/monolog": ">=1.0,<1.2-dev",
|
"monolog/monolog": ">=1.0,<1.3-dev",
|
||||||
"swiftmailer/swiftmailer": "4.2.*",
|
"swiftmailer/swiftmailer": "4.2.*",
|
||||||
"twig/twig": ">=1.1,<2.0-dev"
|
"twig/twig": ">=1.1,<2.0-dev"
|
||||||
},
|
},
|
||||||
|
@ -47,7 +47,11 @@ class DebugHandler extends TestHandler implements DebugLoggerInterface
|
|||||||
public function countErrors()
|
public function countErrors()
|
||||||
{
|
{
|
||||||
$cnt = 0;
|
$cnt = 0;
|
||||||
foreach (array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT) as $level) {
|
$levels = array(Logger::ERROR, Logger::CRITICAL, Logger::ALERT);
|
||||||
|
if (defined('Monolog\Logger::EMERGENCY')) {
|
||||||
|
$levels[] = Logger::EMERGENCY;
|
||||||
|
}
|
||||||
|
foreach ($levels as $level) {
|
||||||
if (isset($this->recordsByLevel[$level])) {
|
if (isset($this->recordsByLevel[$level])) {
|
||||||
$cnt += count($this->recordsByLevel[$level]);
|
$cnt += count($this->recordsByLevel[$level]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user