Thruster LoggerWrap Component wraps LoggerInterface and provides LoggerInterface with optional logging
Via Composer
$ composer require thruster/logger-wrap
Simple wrap your LoggerInterface object or not to enable/disable logging without bunch of if conditions around.
$logger = new Logger();
$wrappedLogger = new LoggerWrap($logger);
$wrappedLogger->info('Foo Bar'); // Will call $logger->info('Foo Bar');
Or not pass logger to disable logging
$wrappedLogger = new LoggerWrap();
$wrappedLogger->info('Foo Bar'); // Will not call anything
Run test cases
$ composer test
Run test cases with coverage (HTML format)
$ composer test-coverage
Run PHP style checker
$ composer check-style
Run PHP style fixer
$ composer fix-style
Please see CONTRIBUTING and CONDUCT for details.
Please see License File for more information.