library zf1-log-psr3
A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.
boerl/zf1-log-psr3
A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.
- Thursday, December 22, 2016
- by boerl
- Repository
- 0 Watchers
- 1 Stars
- 418 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 3 Versions
- 207 % Grown
PSR-3 compliant wrapper for Zend Framework 1's Logger
Did you ever want to use your good old (fashioned) ZF1 logger
in a modern loosely coupled library that expects a PSR-3 compliant logger?
Then this is the library for you. You can keep your existing logger (e.g. to share with other components of your
software) and disguise it to feed it to the new library., (*1)
Features
- PSR-3 style placeholders are rewritten to ZF1 style.
E.g.
{example}
becomes %example%
.
(Can be disabled.)
-
logLevel
is added to the extras
cq context array.
(Can be disabled.)
- (Not directly related to the goal of this library, but useable for testing:) A very basic implementation of
Zend_Log_Writer_Abstract
is available: MemoryWriter
.
It keeps the formatted logged messages in memory, to be retrieved later.
Usage
Require this package
with composer
and use its autoloader., (*2)
// Start with your existing instance of Zend_Log.
$myZendLog = new \Zend_Log();
// Optionally create a configuration array.
$optionalConfig = ['foo' => 'bar'];
// Instantiate the Wrapper from the existing Zend_Log and optionally the configuration.
$myPsr3CompliantLogger = new \Boerl\Zf1LogPsr3\Wrapper($myZendLog, $optionalConfig);
For available configuration options, look at Wrapper::getDefaultConfig()
., (*3)
Links
dev-master
9999999-dev
A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.
Sources
Download
MIT
The Requires
The Development Requires
by
Roel Arents
log
psr-3
zf1
wrapper
zend
psr3
facade
v0.1.1
0.1.1.0
A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.
Sources
Download
MIT
The Requires
The Development Requires
by
Roel Arents
log
psr-3
zf1
wrapper
zend
psr3
facade
v0.1
0.1.0.0
A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.
Sources
Download
MIT
The Requires
The Development Requires
by
Roel Arents
log
psr-3
zf1
wrapper
zend
psr3
facade