duon/log

A simple PSR-3 Logger

Installs: 45

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/duon/log

0.1.0 2026-01-31 19:14 UTC

This package is auto-updated.

Last update: 2026-01-31 21:33:45 UTC


README

Software License Codacy Badge Codacy Badge Psalm level Psalm coverage

A simple PSR-3 logger using PHP's error_log function.

Testing

During testing, PHP's error_log ini setting is set to a temporary file. To print the output to the console, prepend a special env variable to the PHPUnit cli command, as follows:

ECHO_LOG=1 phpunit

Test Environment Requirements

Tests require:

  • ini_set() function enabled (for error_log redirection)
  • Writable system temp directory (for test log file isolation)
  • PHP error_reporting must be modifiable

These are standard in development environments but may fail in restricted PHP configurations where ini_set is disabled via disable_functions.

License

This project is licensed under the MIT license.