We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

\Phalcon\Logger\Formatter\Json::format wrong number of parameters

Please look gist, I'm developing Redis Logger with rpush, publish and pipeline. I had a problem on line 113 showing that the number of parameters of format function was wrong. Look in the comments of the gist. Any help is welcome. Thanks.

I try use only that and error keeps.

$log = new \Phalcon\Logger\Adapter\File("app/logs/test.log");
$log->setFormatter(new  Phalcon\Logger\Formatter\Json());
$log->info('test');

Hi, what version of phalcon are you using?

i think versions prior to 1.3.0 dont have 4th optional $context param in logInternal method signature



98.9k
Accepted
answer

This is fixed in 1.3.2