djiney / yii2-routes-logger
Yii Framework 2.0 Component routes logger
Installs: 1 106
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.0.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-10-21 23:33:26 UTC
README
Simple Yii2 extension to log all requested routes.
Installing
Composer installation
composer require djiney/yii2-routes-logger dev-master
Configuration
Migration
Just run base Yii2 migration with custom path
php yii migrate/up --migrationPath=@vendor/djiney/yii2-routes-logger/src/migrations/
Bootstrap
Add a configuration array to the bootstrap part of your application:
'bootstrap' => [
...
[
'class' => 'djiney\routes\components\RoutesLogger',
'filter' => 'djiney\routes\components\RoutesLoggerFilter'
],
...
],
If you use a "Yii2 Advanced Application", you can specify different settings to frontend and backend.
Filter is not necessary, but if you don't need too many logs - feel free to use the default one (which allows you to get rid of guest's routes logs), or just create your own.
The filter should implement RoutesLoggerFilterInterface.