1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Merge pull request #706 from acrobat/amqp_handler_fix

Removed substr call in amqp routing key generator
This commit is contained in:
Jordi Boggiano
2016-04-15 18:05:13 +01:00
2 changed files with 3 additions and 8 deletions

View File

@@ -114,12 +114,7 @@ class AmqpHandler extends AbstractProcessingHandler
*/
private function getRoutingKey(array $record)
{
$routingKey = sprintf(
'%s.%s',
// TODO 2.0 remove substr call
substr($record['level_name'], 0, 4),
$record['channel']
);
$routingKey = sprintf('%s.%s', $record['level_name'], $record['channel']);
return strtolower($routingKey);
}

View File

@@ -61,7 +61,7 @@ class AmqpHandlerTest extends TestCase
'channel' => 'test',
'extra' => array(),
),
'warn.test',
'warning.test',
0,
array(
'delivery_mode' => 2,
@@ -111,7 +111,7 @@ class AmqpHandlerTest extends TestCase
'extra' => array(),
),
'log',
'warn.test',
'warning.test',
false,
false,
null,