Answer the question
In order to leave comments, you need to log in
Yii::log() not working in RabbitMQ worker body?
Hello!
I ran into a problem when calling the Yii::log() function in the body of the callback function of the RabbitMQ worker.
I write like this:
$callback = function($msg) {
Yii::log('Log me please', 'error', 'application');
};
$channel->basic_consume('task_queue', '', false, true, false, false, $callback);
$callback = function($msg) {
Yii::log('Log me please', 'error', 'application');
exit; // лог появился!
};
$channel->basic_consume('task_queue', '', false, true, false, false, $callback);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question