cornernote / yii-audit-module

Track and display usage information including page requests, database field changes, php errors and yii logs.
https://cornernote.github.io/yii-audit-module
Other
22 stars 13 forks source link

Only requests from audit itself are stored #22

Closed gb5256 closed 10 years ago

gb5256 commented 10 years ago

Hello, I have just installed this extension and I am impressed by it. This is exactly what I was looking for.

I think I do have a configuration issue (perhaps I misunderstand how your ext works). In the request table, I do only see requests stored by audit itself. If I go to other controllers, it it not recording any requests. Do I need to set this up somehow per controller?

gb5256

cornernote commented 10 years ago

Hello,

An AuditRequest will be stored depending on the following conditions:

Yii::app()->errorHandler->trackAllRequests = true - This will cause all requests from all controllers/commands to be tracked.

Yii::app()->errorHandler->trackAllRequests = false - This will cause any request that has an AuditField or AuditError saved to have an AuditRequest also saved. If AuditField or AuditError are not required for the request then an AuditRequest will not be saved.

Let me know if the module is still not saving your data as expected.

gb5256 commented 10 years ago

Ah, now I understand. I was under the impression, that trackAllRequests=false would really not store anything anymore. Thanks for your answer.