koderhut / onelog-bundle
A simplified way to inject loggers into objects for Symfony apps
Installs: 1 964
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 2
Type:symfony-bundle
Requires
- php: >=7.1
Requires (Dev)
- monolog/monolog: ~1.22
- nyholm/symfony-bundle-test: dev-master
- phpstan/phpstan: ^0.10.0@dev
- phpunit/phpunit: ^7.3@dev
- symfony/config: ~2.7|~3.3|~4.0
- symfony/dependency-injection: ~2.7|~3.4.10|^4.0.10
- symfony/http-kernel: ~2.7|~3.3|~4.0
- symfony/monolog-bridge: ~2.7|~3.3|~4.0
README
Onelog Bundle
This bundle will help with wrapping all monolog and other loggers in a Symfony app into a single logger entry point simplifying the logging needed in an app.
Usages
- $onelog->debug('test', []); <-- wil proxy the data to the default logger, in case of Monolog the app logger is used
- $onelog->my_logger->debug('test', []); <-- will forward the call to the logger my_logger, in case of Monolog to the my_logger channel
- \OneLog::debug('test', []); <-- shortcut to the default logger instance
- \OneLog::instance()->my_logger->debug('test', []); <-- shortcut for accessing a specific logger instance
To be added:
- $onelog->logObject($object, []);
LICENSE
Please review the LICENSE file