This component provides adapters for using Psr Logger in Log4Php Environment and vice versa.
The main idea is to easy up usage and/or migration of existing Log4Php application with/into Psr loggers.
The build status of the current master branch is tracked by Travis CI:
@todo The versioneye status is:
@todo Take a look on openhub.net.
- Log4Php to Psr Logger Bridge
- Psr Logger to Log4PhP Bridge
$adapter = new \Net\Bazzline\Component\PsrAndLog4PhpAdapter\Log4PhpToPsrAdapter('your name');
$adapter->injectPsrLogger($psrLoggerInstance);
$adapter->debug('my debug log');
$adapter = new \Net\Bazzline\Component\PsrAndLog4PhpAdapter\PsrToLog4PhpAdapter($log4PhpInstance);
$adapter->debug('my debug log');
mkdir vendor/net_bazzline/php_component_psr_and_log4php_adapter
cd vendor/net_bazzline/php_component_psr_and_log4php_adapter
git clone https://github.com/stevleibelt/php_component_psr_and_log4php_adapter .
require: "net_bazzline/component_psr_and_log4php_adapter": "dev-master"
- throwable are currently ignored in Log4PhpToPsrAdapter::log()
- context is currently ignored in PsrToLog4PhpAdapter::log()
This software is licenced under GNU LESSER GENERAL PUBLIC LICENSE. The full licence text is shipped within this component package.
- upcoming
- @todo
- add versioneye dependecy status
- add link to openhub
- fixed typos in the readme
- implement conversion of throwable into something in Log4PhpToPsrAdapter::log()
- implement conversion of context into something in PsrToLog4PhpAdapter
- added travis build status
- added scrutinizer build status
- @todo
- 2.0.0
- added example
- added version boundary to psr log and log4php
- covered code with unit tests
- moved injected logger from protected to private
- moved to psr-4 autoloading
- refactored loggers and the way how to inject the logger you want to bridge
- removed Log4PhpLoggerInterface since this simple complicates stuff
- 1.0.0
- Log4Php Logger Interface
- Log4Php to Psr Logger Bridge
- Psr Logger to Log4PhP Bridge