The correct way to write to the log is:
Yii::log($message, $level, $category);
But the fact is that $ category should not be empty .
The example above works because the message is written in a category, then the category is not empty, but it writes an empty message. He writes a category, so it looks like a message .. but it is not.
source share