Releases: pmmp/Log
Releases · pmmp/Log
0.4.0
This is a major release containing breaking API changes.
Changes since 0.3.x
- Removed
LoggerAttachment
. AttachableLogger
now usesClosure(mixed,string):void
instead ofLoggerAttachment
.AttachableLogger
defines a PHPStan type aliasLoggerAttachment
, which can be imported using@phpstan-import-type
. This type alias isClosure(mixed $level, string $message) : void
.
0.3.0
This is a feature release. It does not feature any breaking API changes, but it does add some new classes to the global namespace.
Changes since 0.2.x
- Dropped support for PHP 7.2 and 7.3.
- Added
PrefixedLogger
. This wraps around aLogger
and automatically adds a prefix to log messages before passing them to the originalLogger
. - Added
GlobalLogger
, which provides static always-available access to a logger via staticget()
andset()
methods. - Added
BufferedLogger
interface. Loggers which implement this interface allow logging a block of messages which will appear together, regardless of if the logger may be receiving messages from multiple sources simultaneously. - Added
SimpleLogger
, which is used as the default logger forGlobalLogger
. It justecho
s messages to the console like[INFO] This is a message
.