You must implement the interface as it is, or you wouldn't be implementing it.
Offering PSR-3 is incompatible. Releasing version 3.0 signals "incompatible to 2.x" all over it. Note that the log levels defined in the RFC PSR-3 is based on are partly incompatible to the ones of Log4PHP 2.x. So this will be incompatible in any case. BTW: Would be nice to use PSR-4 autoloading as well - which means using namespaces. Which is also incompatible. On 24. Februar 2015 15:41:57 MEZ, Michel Feldheim <[email protected]> wrote: >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? Regards, Sven
