Skip to content

easydowork/yii2-error-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

//common/config 添加数据库配置
$sqliteConfig = require '../../adminlog/config/sqlite.php';
'sqlite' => $sqliteConfig,

//配置 log 组件
'log' => [
    'targets' => [
        [
            'class' => 'adminlog\components\ErrorDbTarget',
            'levels' => ['error'],
            'db' => 'sqlite',
            'logTable' => 'error_log',
        ],
    ],
],


//common/config/bootstrap.php
Yii::setAlias('@adminlog', dirname(dirname(__DIR__)) . '/adminlog');

chmod 0777 error_log.db 
chmod 0777 runtime/

添加一个二级域名,独立访问。指向 admin/web 目录下

//忽略 sqlite 数据库变动
git update-index --assume-unchanged adminlog/error_log.db

About

查看yii2 错误日志

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published