All Versions
69
Latest Version
Avg Release Cycle
63 days
Latest Release
633 days ago

Changelog History
Page 1

  • v3.2.0 Changes

    July 24, 2022
    • Deprecated CubeHandler and PHPConsoleHandler as both projects are abandoned and those should not be used anymore (#1734)
    • Marked Logger @final as it should not be extended, prefer composition or talk to us if you are missing something
    • Added RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord to increase interoperability (#1723)
    • Added SyslogFormatter to output syslog-like files which can be consumed by tools like lnav (#1689)
    • Added support for __toString for objects which are not json serializable in JsonFormatter (#1733)
    • Added GoogleCloudLoggingFormatter (#1719)
    • Added support for Predis 2.x (#1732)
    • Added AmqpHandler->setExtraAttributes to allow configuring attributes when using an AMQPExchange (#1724)
    • Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
    • Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing \n or \r sequences (#1720)
    • Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
    • Fixed PHP 8.2 deprecation warnings (#1722)
    • Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)
  • v3.1.0 Changes

    June 09, 2022
    • Added $datetime parameter to Logger::addRecord as low level API to allow logging into the past or future (#1682)
    • Added Logger::useLoggingLoopDetection to allow disabling cyclic logging detection in concurrent frameworks (#1681)
    • Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
    • Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680)
    • Marked the reusable Monolog\Test\TestCase class as @internal to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
    • Fixed RotatingFileHandler issue when the date format contained slashes (#1671)
  • v3.0.0 Changes

    May 10, 2022

    ๐Ÿ”„ Changes from RC1

    • The Monolog\LevelName enum does not exist anymore, use Monolog\Level->getName() instead.
  • v3.0.0-RC1 Changes

    May 08, 2022

    ๐Ÿš€ This is mostly a cleanup release offering stronger type guarantees for integrators with the array->object/enum changes, but there is no big new feature for end users.

    โฌ†๏ธ See [UPGRADE notes](UPGRADE.md#300) for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces.

    Noteworthy BC Breaks:

    • ๐Ÿ‘ The minimum supported PHP version is now 8.1.0.
    • ๐ŸŒฒ Log records have been converted from an array to a [Monolog\LogRecord object](src/Monolog/LogRecord.php) with public (and mostly readonly) properties. e.g. instead of doing $record['context'] use $record->context. In formatters or handlers if you rather need an array to work with you can use $record->toArray() to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases in the level and level_name keys to be more backwards compatible and use simpler data types.
    • FormatterInterface, HandlerInterface, ProcessorInterface, etc. changed to contain LogRecord $record instead of array $record parameter types. If you want to support multiple Monolog versions this should be possible by type-hinting nothing, or array|LogRecord if you support PHP 8.0+. You can then code against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC. The interfaces do not require a LogRecord return type even where it would be applicable, but if you only support Monolog 3 in integration code I would recommend you use LogRecord return types wherever fitting to ensure forward compatibility as it may be added in Monolog 4.
    • ๐ŸŒฒ Log levels are now enums [Monolog\Level](src/Monolog/Level.php) and [Monolog\LevelName](src/Monolog/LevelName.php)
    • โœ‚ Removed deprecated SwiftMailerHandler, migrate to SymfonyMailerHandler instead.
    • ResettableInterface::reset() now requires a void return type.
    • All properties have had types added, which may require you to do so as well if you extended a Monolog class and declared the same property.

    ๐Ÿ†• New deprecations:

    • ๐Ÿ—„ Logger::DEBUG, Logger::ERROR, etc. are now deprecated in favor of the Monolog\Level enum. e.g. instead of Logger::WARNING use Level::Warning if you need to pass the enum case to Monolog or one of its handlers, or Level::Warning->value if you need the integer value equal to what Logger::WARNING was giving you.
    • ๐Ÿ—„ Logger::getLevelName() is now deprecated.
  • v2.8.0 Changes

    July 24, 2022
    • Deprecated CubeHandler and PHPConsoleHandler as both projects are abandoned and those should not be used anymore (#1734)
    • Added RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord to increase interoperability (#1723)
    • Added support for __toString for objects which are not json serializable in JsonFormatter (#1733)
    • Added GoogleCloudLoggingFormatter (#1719)
    • Added support for Predis 2.x (#1732)
    • Added AmqpHandler->setExtraAttributes to allow configuring attributes when using an AMQPExchange (#1724)
    • Fixed serialization/unserialization of handlers to make sure private properties are included (#1727)
    • Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing \n or \r sequences (#1720)
    • Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726)
    • Fixed PHP 8.2 deprecation warnings (#1722)
    • Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678)
  • v2.7.0 Changes

    June 09, 2022
    • Added $datetime parameter to Logger::addRecord as low level API to allow logging into the past or future (#1682)
    • Added Logger::useLoggingLoopDetection to allow disabling cyclic logging detection in concurrent frameworks (#1681)
    • Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670)
    • Marked the reusable Monolog\Test\TestCase class as @internal to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)
    • Fixed RotatingFileHandler issue when the date format contained slashes (#1671)
  • v2.6.0 Changes

    May 10, 2022
    • Deprecated SwiftMailerHandler, use SymfonyMailerHandler instead
    • Added SymfonyMailerHandler (#1663)
    • Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662)
    • Added a way to filter/modify stack traces in LineFormatter (#1665)
    • Fixed UdpSocket not being able to reopen/reconnect after close()
    • Fixed infinite loops if a Handler is triggering logging while handling log records
  • v2.5.0 Changes

    April 08, 2022
    • Added callType to IntrospectionProcessor (#1612)
    • Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651)
  • v2.4.0 Changes

    March 14, 2022
    • Added [Monolog\LogRecord](src/Monolog/LogRecord.php) interface that can be used to type-hint records like array|\Monolog\LogRecord $record to be forward compatible with the upcoming Monolog 3 changes
    • Added includeStacktraces constructor params to LineFormatter & JsonFormatter (#1603)
    • Added persistent, timeout, writingTimeout, connectionTimeout, chunkSize constructor params to SocketHandler and derivatives (#1600)
    • Added AsMonologProcessor PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637)
    • Added support for keeping native BSON types as is in MongoDBFormatter (#1620)
    • Added support for a user_agent key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613)
    • Added support for username/userIcon in SlackWebhookHandler (#1617)
    • Added extension points to BrowserConsoleHandler (#1593)
    • Added record message/context/extra info to exceptions thrown when a StreamHandler cannot open its stream to avoid completely losing the data logged (#1630)
    • Fixed error handler signature to accept a null $context which happens with internal PHP errors (#1614)
    • Fixed a few setter methods not returning self (#1609)
    • Fixed handling of records going over the max Telegram message length (#1616)
  • v2.3.5 Changes

    October 01, 2021
    • Fixed regression in StreamHandler since 2.3.3 on systems with the memory_limit set to >=20GB (#1592)