mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-20 08:06:19 +02:00
Cosmetic fixes
This commit is contained in:
@@ -22,11 +22,11 @@ class AmqpHandler extends AbstractProcessingHandler
|
||||
protected $exchange;
|
||||
|
||||
/**
|
||||
* @param \AMQPExchange $exchange AMQP exchange, ready for use
|
||||
* @param string $exchangeName
|
||||
* @param string $issuer isser name
|
||||
* @param int $level
|
||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
* @param \AMQPExchange $exchange AMQP exchange, ready for use
|
||||
* @param string $exchangeName
|
||||
* @param string $issuer issuer name
|
||||
* @param int $level
|
||||
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
*/
|
||||
public function __construct(\AMQPExchange $exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true)
|
||||
{
|
||||
@@ -43,18 +43,21 @@ class AmqpHandler extends AbstractProcessingHandler
|
||||
{
|
||||
$data = $record["formatted"];
|
||||
|
||||
$routingKey = sprintf('%s.%s',
|
||||
$routingKey = sprintf(
|
||||
'%s.%s',
|
||||
substr($record['level_name'], 0, 4),
|
||||
$record['channel']);
|
||||
$record['channel']
|
||||
);
|
||||
|
||||
//we do not check return value because no handler really does
|
||||
$this->exchange->publish($data,
|
||||
$this->exchange->publish(
|
||||
$data,
|
||||
strtolower($routingKey),
|
||||
0,
|
||||
array(
|
||||
'delivery_mode' => 2,
|
||||
'Content-type' => 'application/json'
|
||||
));
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user