Skip to content

"Thruster LoggerWrap Component wraps LoggerInterface and provides LoggerInterface with optional logging"

License

Notifications You must be signed in to change notification settings

ThrusterIO/logger-wrap

Repository files navigation

LoggerWrap

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Thruster LoggerWrap Component wraps LoggerInterface and provides LoggerInterface with optional logging

Install

Via Composer

$ composer require thruster/logger-wrap

Usage

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

Testing

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

Contributing

Please see CONTRIBUTING and CONDUCT for details.

License

Please see License File for more information.

About

"Thruster LoggerWrap Component wraps LoggerInterface and provides LoggerInterface with optional logging"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages