Version 3 is here
Version 3.0 makes a large number of internal updates enabled by modern versions of PHP. In doing so, it also drops support for versions that are no longer under active maintenance (8.0 and older).
Major new features
Formatting has been completely overhauled
The core loggers now accept a FormatterInterface object, which is responsible for interpolating messages and producing an appropriate format. The existing format continues to be supported, along with basic customization, through the DefaultFormatter, which will be used if no formatter is provided.
A logfmt formatter is also included, which greatly simplifies modern structured logging. Any context values that are not interpolated into the message will be added as structured outputs. See the README for details and usage instructions.
BC Breaks
If you have been using the library with default values, there should be no BC breaks that affect you.
Non-PSR methods that aren't added to an explicit interface have been removed, and some formatting tools have been restructured. If you were heavily customizing the formatter or had extended the internal Base class, you will likely need to make changes.
See UPGRADING.md for details.
What's Changed
- Update Github Actions by @Firehed in #31
- Update to currently-supported PHP versions by @Firehed in #30
- Improve type safety now supported by dropping psr/log@1 by @Firehed in #32
- Remove dump() method by @Firehed in #33
- Localize and tidy syslog utilities by @Firehed in #34
- Update dev dependencies by @Firehed in #35
- Fix a PHPUnit deprecation by @Firehed in #36
- Separate out log level filtering by @Firehed in #37
- Decouple chain logger from base by @Firehed in #38
- Split formatting logic into dedicated tool by @Firehed in #39
- Add
logfmtformatter by @Firehed in #40 - README updates for 3.x by @Firehed in #41
- CI updates to move default branch from master to main by @Firehed in #42
Full Changelog: 2.5.0...3.0.0