Skip to content

Releases: pmmp/Log

0.4.0

18 Jun 19:11
e6c912c
Compare
Choose a tag to compare

This is a major release containing breaking API changes.

Changes since 0.3.x

  • Removed LoggerAttachment.
  • AttachableLogger now uses Closure(mixed,string):void instead of LoggerAttachment.
    • AttachableLogger defines a PHPStan type alias LoggerAttachment, which can be imported using @phpstan-import-type. This type alias is Closure(mixed $level, string $message) : void.

0.3.0

18 May 21:08
03ab131
Compare
Choose a tag to compare

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 a Logger and automatically adds a prefix to log messages before passing them to the original Logger.
  • Added GlobalLogger, which provides static always-available access to a logger via static get() and set() 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 for GlobalLogger. It just echos messages to the console like [INFO] This is a message.