Log REST API calls

I still learning about Yii’s REST API, and i found this for security.

Was wondering if Yii had a built in feature to log API calls? Or do i have to create my own in beforeAction() of yii\rest\ActiveController ?

Is there already an extension someone built for this by any chance? Or
Is there a better way than using beforeAction()?


Hi @shaho

Yii already has a built-in logging framework.
Usually you have to

  1. configure logging module
  2. log messages wherever you want to

and, that’s all.