Backported CFileLogRoute code from Yii2