Hey guys,
working on
https://issues.apache.org/jira/browse/LOG4PHP-211?jql=project%20%3D%20LOG4PHP
PSR-3 interface implementation
(https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#13-context)
PSR-3 defines a common interface for logging libraries.
If implementing this interface, the usage of log4php would slightly change.
Currently you can pass any throwable as argument into every log method
https://github.com/apache/logging-log4php/blob/master/src/main/php/Logger.php#L171
e.g.
$logger->warn('message', $exception);
the PSR-3 interface enforces $context array or null as parameter
https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php#L113
e.g.
$logger->warn('message {placeholder}, array('placeholder' =>
'senseless', 'exception' => $exception));
I could go the strict way and implement their interface, then 3.0.0
would not be downward compatible
or slightly modify the interface to not enforce type array
What's your preference?