1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00
This commit is contained in:
Jordi Boggiano
2018-12-08 18:16:32 +01:00
parent b978700c05
commit 0ad73a526f
16 changed files with 25 additions and 21 deletions

View File

@@ -81,6 +81,7 @@ class ElasticaHandler extends AbstractProcessingHandler
if ($formatter instanceof ElasticaFormatter) {
return parent::setFormatter($formatter);
}
throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter');
}

View File

@@ -89,6 +89,7 @@ class ElasticsearchHandler extends AbstractProcessingHandler
if ($formatter instanceof ElasticsearchFormatter) {
return parent::setFormatter($formatter);
}
throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter');
}

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.

View File

@@ -69,7 +69,9 @@ class JsonFormatterTest extends TestCase
"channel": "test",
"datetime": "'.$record['datetime']->format('Y-m-d\TH:i:s.uP').'",
"extra": {}
}', $formatter->format($record));
}',
$formatter->format($record)
);
$formatter->setJsonPrettyPrint(false);
$record = $this->getRecord();

View File

@@ -183,6 +183,7 @@ class ElasticaHandlerTest extends TestCase
$client = new Client();
$handler = new ElasticaHandler($client, $this->options);
try {
$handler->handleBatch([$msg]);
} catch (\RuntimeException $e) {

View File

@@ -80,7 +80,7 @@ class ElasticsearchHandlerTest extends TestCase
],
],
$data,
]
],
];
// setup ES client mock
@@ -255,7 +255,7 @@ class ElasticsearchHandlerTest extends TestCase
$params = [
'index' => $index,
'type' => $type,
'id' => $documentId
'id' => $documentId,
];
$data = $client->get($params);

View File

@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/*
* This file is part of the Monolog package.
@@ -22,7 +22,6 @@ use Monolog\Test\TestCase;
*/
class SignalHandlerTest extends TestCase
{
private $asyncSignalHandling;
private $blockedSignals;
private $signalHandlers;
@@ -56,7 +55,8 @@ class SignalHandlerTest extends TestCase
}
}
private function setSignalHandler($signo, $handler = SIG_DFL) {
private function setSignalHandler($signo, $handler = SIG_DFL)
{
if (function_exists('pcntl_signal_get_handler')) {
$this->signalHandlers[$signo] = pcntl_signal_get_handler($signo);
} else {
@@ -284,5 +284,4 @@ class SignalHandlerTest extends TestCase
array(true, true, 1, 1),
);
}
}