From 1cb1cde8e8dd0f70cc0fe51354a59acad9302084 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 14 Dec 2020 14:15:25 +0100 Subject: [PATCH] Update changelog --- CHANGELOG.md | 15 +++++++++++++++ src/Monolog/Handler/SyslogUdp/UdpSocket.php | 4 ++-- src/Monolog/Handler/SyslogUdpHandler.php | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 073247ada..e5b27842d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +### 2.2.0 (2020-12-14) + + * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere + * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation + * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH + * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7 + * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms + * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket) + * Added handleBatch support for TelegramBotHandler + * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler + * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars) + * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters + * Fixed PHP 8 issues in SyslogUdpHandler + * Fixed internal type error when mbstring is missing + ### 2.1.1 (2020-07-23) * Fixed removing of json encoding options diff --git a/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/src/Monolog/Handler/SyslogUdp/UdpSocket.php index 33696d7a4..228a705ab 100644 --- a/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ b/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -33,8 +33,8 @@ public function __construct(string $ip, int $port = 514) $protocol = SOL_UDP; // Check if we are using unix sockets. if ($port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; + $domain = AF_UNIX; + $protocol = IPPROTO_IP; } $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null; } diff --git a/src/Monolog/Handler/SyslogUdpHandler.php b/src/Monolog/Handler/SyslogUdpHandler.php index fdfabf345..a31ae9a01 100644 --- a/src/Monolog/Handler/SyslogUdpHandler.php +++ b/src/Monolog/Handler/SyslogUdpHandler.php @@ -38,8 +38,8 @@ class SyslogUdpHandler extends AbstractSyslogHandler protected $rfc; /** - * @param string $host - * @param int $port + * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) + * @param int $port Port number, or 0 if $host is a unix socket * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant * @param string|int $level The minimum logging level at which this handler will be triggered * @param bool $bubble Whether the messages that are handled can bubble up the stack or not