2017 © Pedro Peláez
 

yii2-extension yii2-log-reader

Yii2 log reader

image

kriss/yii2-log-reader

Yii2 log reader

  • Friday, December 15, 2017
  • by kriss
  • Repository
  • 1 Watchers
  • 2 Stars
  • 235 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 120 % Grown

The README.md

Yii2 Log Reader

Yii2 log reader, (*1)

this project is extend from zhuravljov/yii2-logreader, and Add more operation like delete download tail and so on., (*2)

from 2.0. history can load file that Yii2 FileTarget rotated. See History Usage, (*3)

Preview

Index, (*4)

preview1, (*5)

History, (*6)

preview2, (*7)

Installation

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

Either run, (*9)

php composer.phar require --prefer-dist kriss/yii2-log-reader "2.*"

or add, (*10)

"kriss/yii2-log-reader": "2.*"

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

Usage

Once the extension is installed, simply modify your application configuration as follows:, (*12)

return [
    'bootstrap' => ['log-reader'],
    'modules' => [
        'log-reader' => [
            'class' => 'kriss\logReader\Module',
            //'as login_filter' => UserLoginFilter::class, // to use login filter
            'aliases' => [
                'Frontend' => '@frontend/runtime/logs/app.log',
                'Backend' => '@backend/runtime/logs/app.log',
                'Console' => '@console/runtime/logs/app.log',
            ],
            //'defaultTailLine' => 200,
        ],
    ],
];

You can then access Log Reader using the following URL:, (*13)

http://localhost/path/to/index.php?r=log-reader

or if you have enabled pretty URLs, you may use the following URL:, (*14)

http://localhost/path/to/log-reader

History Usage

For every day log view, you can config yii log like this:, (*15)

[
    'class' => 'yii\log\FileTarget',
    'categories' => ['test'],
    'logVars' => [],
    'logFile' => '@runtime/logs/test/test.log.' . date('Ymd'), // important
    'maxLogFiles' => 31,
    'dirMode' => 0777,
    'fileMode' => 0777,
]

And config log-reader module aliases like:, (*16)

'test' => '@runtime/logs/test/test.log'

Then log with be save filename like test.log.20190924. This is log-reader history load filename., (*17)

So you can view every day log in history action., (*18)

The Versions

15/12 2017

dev-master

9999999-dev

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader

15/12 2017

v2.2

2.2.0.0

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader

06/09 2017

v2.1

2.1.0.0

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader

06/09 2017

v2.0

2.0.0.0

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader

05/09 2017

v1.1

1.1.0.0

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader

05/09 2017

v1.0

1.0.0.0

Yii2 log reader

  Sources   Download

MIT

The Requires

 

by Avatar kriss

log extension yii2 module log reader