YiiLogExtension is a component that extends Yii::log functionality to handle arrays and exceptions and output in files in JSON format. Finally handles log rotation.
array(
'class' =>'JsonLogger',
'categories' =>'category_key',
'logFile' =>'output.json', // File to be parsed by logstash
'logPath' =>dirname(__FILE__).'/../../logs',
'maxFileSize' =>5120,
'maxLogFiles' =>50,
)
Use LogWrapper, which extends Yii::log functionality
LogWrapper::log('dummy message', 'error_level', 'category_key')
LogWrapper::logArray($array, 'error_level', 'category_key')
LogWrapper::logException($exc, 'error_level', 'category_key')
docker-compose run phpunit tests