pythagor / yii2-mongolog
Yii2 Module for Web Application user's activity log at MongoDB
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2-mongodb: *
Requires (Dev)
- phpunit/phpunit: 4.3.*
This package is not auto-updated.
Last update: 2025-01-14 17:28:37 UTC
README
The yii2-mongolog is a Yii2 module for store web application user's activity log in the MongoDB.
Installation
The preferred way to install this extension is through composer.
Configuration
- Add mongolog module into modules section of your config.
- Set your MongoDB collection name for store log data.
- Set correct dsn string to connect with right MongoDB instance and database.
- Add mongolog module into bootstrap section of your config.
Example
'modules' => [ // ... 'mongolog' => [ 'class' => 'pythagor\mongolog\Module', 'logCollection' => 'YourCollectionName', 'components' => [ 'db_log' => [ 'class' => 'yii\mongodb\Connection', 'dsn' => 'mongodb://localhost:27017/YourDatabaseName', ], ], ], ], 'bootstrap' => [ // ... 'mongolog', ],
License
yii2-mongolog is released under the MIT License.