Monolog v2.3.0 Release Notes

Release Date: 2021-07-05 // 3 months ago
    • Added a ton of PHPStan type annotations as well as type aliases on Monolog\Logger for Record, Level and LevelName that you can import (#1557)
    • Added ability to customize date format when using JsonFormatter (#1561)
    • Fixed FilterHandler not calling reset on its internal handler when reset() is called on it (#1531)
    • Fixed SyslogUdpHandler not setting the timezone correctly on DateTimeImmutable instances (#1540)
    • Fixed StreamHandler thread safety - chunk size set to 2GB now to avoid interlacing when doing concurrent writes (#1553)

Previous changes from v2.2.0

    • 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