1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00
This commit is contained in:
Jordi Boggiano
2016-05-26 20:54:06 +01:00
parent 85e43a5e7b
commit f200e79879
115 changed files with 1138 additions and 1123 deletions

View File

@@ -43,7 +43,7 @@ class ElasticSearchHandler extends AbstractProcessingHandler
/**
* @var array Handler config options
*/
protected $options = array();
protected $options = [];
/**
* @param Client $client Elastica Client object
@@ -51,16 +51,16 @@ class ElasticSearchHandler extends AbstractProcessingHandler
* @param int $level The minimum logging level at which this handler will be triggered
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true)
public function __construct(Client $client, array $options = [], $level = Logger::DEBUG, $bubble = true)
{
parent::__construct($level, $bubble);
$this->client = $client;
$this->options = array_merge(
array(
[
'index' => 'monolog', // Elastic index name
'type' => 'record', // Elastic document type
'ignore_error' => false, // Suppress Elastica exceptions
),
],
$options
);
}
@@ -70,7 +70,7 @@ class ElasticSearchHandler extends AbstractProcessingHandler
*/
protected function write(array $record)
{
$this->bulkSend(array($record['formatted']));
$this->bulkSend([$record['formatted']]);
}
/**