Skip to content

pythagor/yii2-mongolog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-mongolog

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

  1. Add mongolog module into modules section of your config.
  2. Set your MongoDB collection name for store log data.
  3. Set correct dsn string to connect with right MongoDB instance and database.
  4. 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.

About

Yii2 Module for Web Application user's activity log at MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages