2017 © Pedro Peláez
 

yii2-extension simple-event-logger

Component is a Yii 2 wrapper of Log

image

frmaxm/simple-event-logger

Component is a Yii 2 wrapper of Log

  • Friday, February 17, 2017
  • by frmaxm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 Simple Event Logger.

This component is a Yii 2 wrapper of Log., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist frmaxm/simple-event-log "dev-master"

or add, (*4)

"frmaxm/simple-event-log": "dev-master"

to the require section of your composer.json file., (*5)

Configuration

Edit bootstrap section in your application config file:, (*6)

'bootstrap' => [
    'model_log'=>[
        'class'=>'frmaxm\logger\bootstrap\ModelLogBootstrap',
        'category'=>'admin',
    ],
    'log'=>[
        'class'=>'yii\log\Logger',
        'flushInterval' => 50,
    ],
]

Edit log component in your application config file:, (*7)

'log' => [
    'traceLevel' => YII_DEBUG ? 3 : 0,
    'targets' => [
        [
            'class' => 'yii\log\DbTarget',
            'categories' => ['model.*'],
        ],
    ],
]

Add new table EventLog to your database., (*8)

Usage

Run module migration:, (*9)

php yii migrate --migrationPath=@frmaxm/simple-event-logger/migrations

Info

All events on the model will be recorded in the Event Log table. This will allow you to see all the user's actions., (*10)

The Versions

17/02 2017

dev-master

9999999-dev

Component is a Yii 2 wrapper of Log

  Sources   Download

BSD-3-Clause

The Requires

 

by Max Frolov

logger log yii2 yii 2 widget event multilogger