mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 04:37:38 +02:00
Reorder parameters for construct method.
This commit is contained in:
@@ -27,14 +27,13 @@ class LogEntriesHandler extends SocketHandler
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $token Log token supplied by LogEntries
|
* @param string $token Log token supplied by LogEntries
|
||||||
|
* @param boolean $useSSL Whether or not SSL encryption should be used.
|
||||||
* @param int $level The minimum logging level to trigger this handler
|
* @param int $level The minimum logging level to trigger this handler
|
||||||
* @param boolean $bubble Whether or not messages that are handled should bubble up the stack.
|
* @param boolean $bubble Whether or not messages that are handled should bubble up the stack.
|
||||||
* @param boolean $useSSL Whether or not SSL encryption should be used.
|
|
||||||
* @param string $format Message format. See Monolog usage documents.
|
|
||||||
*
|
*
|
||||||
* @throws MissingExtensionExcpetion If SSL encryption is set to true and OpenSSL is missing
|
* @throws MissingExtensionExcpetion If SSL encryption is set to true and OpenSSL is missing
|
||||||
*/
|
*/
|
||||||
public function __construct($token, $level = Logger::DEBUG, $bubble = true, $useSSL = true)
|
public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true)
|
||||||
{
|
{
|
||||||
if ($useSSL && !extension_loaded('openssl')) {
|
if ($useSSL && !extension_loaded('openssl')) {
|
||||||
throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
|
throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler');
|
||||||
|
@@ -57,9 +57,10 @@ class LogEntriesHandlerTest extends TestCase
|
|||||||
$this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content);
|
$this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createHandler($logToken = 'testToken', $useSSL = true)
|
private function createHandler()
|
||||||
{
|
{
|
||||||
$args = array($logToken, Logger::DEBUG, true, $useSSL = true);
|
$useSSL = extension_loaded('openssl');
|
||||||
|
$args = array('testToken', $useSSL, Logger::DEBUG, true);
|
||||||
$this->res = fopen('php://memory', 'a');
|
$this->res = fopen('php://memory', 'a');
|
||||||
$this->handler = $this->getMock(
|
$this->handler = $this->getMock(
|
||||||
'\Monolog\Handler\LogEntriesHandler',
|
'\Monolog\Handler\LogEntriesHandler',
|
||||||
|
Reference in New Issue
Block a user