Logging PUT requests

We are using REST according to Yii2 guidelines.

Blockquote
switch (Yii::$app->getRequest()->getMethod()) {
case ‘POST’:
$function = ‘create’;
break;
case ‘PUT’:
$function = ‘update’;
break;
case ‘DELETE’:
$function = ‘delete’;
break;
}
Blockquote

We also have logging configured:

Blockquote
‘log’ => [
‘traceLevel’ => YII_DEBUG ? 3 : 0,
‘targets’ => [
[
‘class’ => ‘yii\log\FileTarget’,
‘levels’ => [‘error’],
‘logVars’ => [’_GET’, ‘_POST’, ‘_FILES’, ‘_COOKIE’, ‘_SESSION’],
],
Blockquote

We see POST but for PUT requests it is empty. PHP doesn’t have a $_PUT variable. Seems we can’t see the JSON that comes in a PUT request, in our logs. Major problem as we debug from the log.