YII日志管理
来源:互联网 发布:代码格式化 知乎 编辑:程序博客网 时间:2024/06/05 15:52
config
日志在yii中配置为组件
'components' => [ 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['trace','error', 'warning'], 'logFile' => '@app/runtime/logs/shop/info.log', 'categories' => ['myinfo'], 'logVars' => [], ], [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], 'logFile' => '@app/runtime/logs/error.log', // 'logFile' => '@app/runtime/logs/shop/application.log', ], [ 'class' => 'mito\sentry\Target', 'levels' => ['error', 'warning'], 'except' => [ 'yii\web\HttpException:404', ], ], ], ],
配置sentry日志
'sentry' => [ 'class' => 'mito\sentry\Component', 'dsn' => 'https://f78287c2f109421588072a9fe722f735:d3c04f5987dd490aab470267ace312a@sentry.io/192585', // private DSN 'environment' => 'staging', // if not set, the default is `production` 'jsNotifier' => true, // to collect JS errors. Default value is `false` 'jsOptions' => [ // raven-js config parameter 'whitelistUrls' => [ // collect JS errors from these urls 'http://staging.my-product.com', 'https://my-product.com', ], ], ],
sentry日志配置好后就可以方便以后在网络实时查看历史日志,以及能及时收到邮件通知
阅读全文
0 0
- YII日志管理
- 【Yii】日志
- Yii日志模块
- yii之-日志使用
- YII日志记录
- yii 2.0 写入日志
- yii 2.0 写入日志
- yii 2.0 写入日志
- YII中日志
- yii 自定义日志文件
- yii日志功能详解
- yii日志记录功能
- yii 自定义日志
- YII Framework学习教程-YII的日志
- YII Framework学习教程-YII的日志
- YII Framework学习教程-YII的日志
- 日志功能--yii::trace()和yii::log()
- YII url美化管理
- freebsd 与 nginx 与 openssl编译 http2
- commons-io使用笔记
- 《剑指offer》孩子们的游戏---约瑟夫问题
- java--public_private_void_static功能作用
- 准备提交到cocoapods的遇到的坑
- YII日志管理
- ss学习记录
- 用龙芯1c库在RT-Thread下实现硬件定时器中断
- 关于current transaction is aborted, commands ignored until end of transaction block与ON_ERROR_ROLLBACK
- GCD Table 中国剩余定理、解线性同余方程组
- [!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfil
- 百练OJ:1017:装箱问题
- 英语系列——词汇暴增
- memcached--查找命令--delete