silinternational/psr3-adapters

Various PSR3-compatible logging adapters.

3.1.0 2022-08-24 14:44 UTC

This package is auto-updated.

Last update: 2024-02-24 18:01:18 UTC


README

Various PSR3-compatible logging adapters.

Adapter-specific notes

Psr3ConsoleLogger

  • Since this is ambiguous regarding whether logged messages are affected by PHP's output buffering, we recommend using either Psr3EchoLogger or Psr3StdOutLogger instead.

Psr3EchoLogger

  • This echoes out the log messages, allowing the output to be buffered so that it appears at the expected place within the rest of the output (such as in tests).

Prs3StdOutLogger

  • This writes to stdout, bypassing any output buffering that PHP might be doing.

Psr3Yii2Logger

  • Make sure your Yii config bootstraps the log component. In other words, include something like this in your Yii config: 'bootstrap' => ['log']