Releases: Firehed/simpleLogger
Release list
3.0.0
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
2.5.0 - Support all major versions of psr/log
2.4.1 - Fix violation of PSR-3 spec
What's Changed
Full Changelog: 2.4.0...2.4.1
2.4.0 - psr/log 2.0 support and more
PHP 8 Support
This release adds official support for PHP 8, and adds it into the CI process. In doing so, support for 7.1 has been dropped (though there are no code changes that should stop it from working on that version) since it's outside of the official PHP support window.
Some additional type information for static analysis tools (like PHPStan) has been added/updated.
2.2.0
This release adds Firehed\SimpleLogger\ConfigurableLoggerInterface (which the provided loggers implement), formalizing the public API for changing the log format and runtime level.
This also deprecates the dump() method, which will be removed in 3.0.
2.1.0
2.0.0
This is a fork of the original SimpleLogger package, with some small updates and adjustments.
Items of note:
- PHP 7.1 is now the lowest supported version, in order to take advantage of modern PHP features
SimpleLogger\Loggerhas been renamed toSimpleLogger\ChainLogger- Timestamps are now in ISO8601 format
- All loggers now support
setLevel(Psr\Log\LogLevel)and will filter out lower-priority messages appropriately - Test coverage and CI tooling has been added
Most other changes are backwards-compatible, but the behavior is not identical to the original package.