pmjones / stdlog
Log output to STDOUT and STDERR.
1.0.0
2023-05-10 21:26 UTC
Requires
- php: ^8.0
- psr/log: ^3.0
Requires (Dev)
- pds/composer-script-names: ^1.0
- pds/skeleton: ^1.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.0
README
Use this psr/log implementation for
logging output to STDOUT
and STDERR
.
Great for logging to console output ...
use pmjones\Stdlog\Stdlog; $log = new Stdlog(); // info level logs to STDOUT $log->info('Hello world!'); // all other levels log to STDERR $log->error('Other world!');
... or to streams:
use pmjones\Stdlog\Stdlog; $log = new Stdlog( stdout: fopen('php://memory', 'w'), stderr: fopen('php://memory', 'w') ); // info level logs to STDOUT $log->info('Hello world!'); // all other levels log to STDERR $log->error('Other world!');