MongoDB Log Route.
Yii 1.1.8 or above
Extract the release file under protected/extensions
In config/main.php:
'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'ext.EMongoDbLogRoute', 'levels'=>'trace, info, error, warning', 'categories' => 'system.*', ), ), ),
Add fsync, safe, timeout options
Add capped collection : Thank you joblo
First Release
Total 4 comments
I have integrated you extension in the directmongosuite
Hope this is ok for you and you will support updates there too.
As addon for this extension I have added a viewer component:
mongodblogviewer
Thanks for comment, joblo. I modified code and released ver1.1.
Thanks for your extension. I'm working a lot with mongoDB and was waiting for this - did't had the time to implement for myself.
One remark:
MongoDB offers a high performance collection type for this purpose:
Capped collections
You have to specify a maximum size of the collection. Once the space is fully utilized, newly added objects will replace the oldest objects.
So I do as small change to your code to add this feature.
But this collection cannot be used directly with Yii for caching, http-session ... because you cannot delete single records from a capped collection. You can only drop it.
Leave a comment
Please login to leave your comment.