1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 09:36:11 +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

@@ -26,7 +26,7 @@ class CubeHandler extends AbstractProcessingHandler
private $scheme;
private $host;
private $port;
private $acceptedSchemes = array('http', 'udp');
private $acceptedSchemes = ['http', 'udp'];
/**
* Create a Cube handler
@@ -105,7 +105,7 @@ class CubeHandler extends AbstractProcessingHandler
{
$date = $record['datetime'];
$data = array('time' => $date->format('Y-m-d\TH:i:s.uO'));
$data = ['time' => $date->format('Y-m-d\TH:i:s.uO')];
unset($record['datetime']);
if (isset($record['context']['type'])) {
@@ -141,10 +141,10 @@ class CubeHandler extends AbstractProcessingHandler
}
curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']');
curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array(
curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Content-Length: ' . strlen('['.$data.']'),
));
]);
Curl\Util::execute($this->httpConnection, 5, false);
}