28.日志路由组件
来源:互联网 发布:3d彩票预测分析算法 编辑:程序博客网 时间:2024/05/29 16:06
日志记录
[php]array( ...... 'preload'=>array('log'), 'components'=>array( ...... 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'trace, info', 'categories'=>'system.*', ), array( 'class'=>'CEmailLogRoute', 'levels'=>'error, warning', 'emails'=>'admin@example.com', ), ), ), ),)
*1.基本日志功能*
'preload' => array('log'),//这句也必须加上'components' => array( 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( //这是一个文件route表示category为test开头的所有类型的输出都会记录到runtime/test.log下面 array( 'class'=>'CFileLogRoute', 'levels'=>'trace, info, debug, warn, error, fatal, profile', 'categories'=>'test.*', 'maxFileSize'=>1048576,//单文件最大1G 'logFile'=>'test.log', ), // // 开发过程中所有日志直接输出到浏览器了,这样不需要登录服务器看日志了 array( 'class' => 'CWebLogRoute', 'categories' => 'test.*', 'levels' => CLogger::LEVEL_PROFILE, 'showInFireBug' => true, 'ignoreAjaxInFireBug' => true, ), array( 'class' => 'CWebLogRoute', 'categories' => 'test.* ', ), array( 'class'=>'CEmailLogRoute', 'levels'=>'error, warning', 'emails'=>'admin@example.com', ), ), ), ),
'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array(//数据库日志记录到db.log中 'class'=>'CFileLogRoute', 'categories'=>'db.*', 'logFile'=>'db.log', ), array(//与用户中心交互的日志记录到uc.log中 'class'=>'CFileLogRoute', 'categories'=>'uc.*', 'logFile'=>'uc.log', ), array(//与Drmc交互的日志记录到uc.log中 'class'=>'CFileLogRoute', 'categories'=>'drmc.*', 'logFile'=>'drmc.log', ), array(//所有的错误日志记录到error.log中 'class'=>'CFileLogRoute', 'levels'=>'error', 'logFile'=>'error.log', ), array(//因为用户中心很重要,所有的用户中心错误日志需要离开发邮件 'class'=>'CEmailLogRoute', 'categories'=>'uc.*', 'levels'=>'error', 'emails'=>'admaker@baidu.com', ), array(//开发过程中,把所有的日志直接打印到页面底部,这样就不需要登录服务器看日志了 'class'=>'CWebLogRoute' 'levels'=>'trace,info,profile,warning,error', ),)
http://www.yiichina.com/doc/guide/1.1/topics.logging
http://www.tuicool.com/articles/yE7VJb
http://orangeholic.iteye.com/blog/1688461
0 0
- 28.日志路由组件
- 29.日志路由组件(2)
- 日志组件
- 日志组件
- vuejs 组件+路由
- Swift路由组件
- vue 路由组件
- Vue 组件 和 路由
- 小米路由启动日志
- Meteor 组件 iron router 路由
- camel 路由跳转组件使用
- ios组件化设计-路由
- React基础(路由,组件,事件)
- VUE 路由及组件使用
- Log4net日志组件
- 日志记录组件
- NSNotificationCenter 编写日志组件
- 轻量级日志组件
- linux学习总结
- HashMap原理详讲
- 星星评分
- ViewPager 全面剖析及使用详解
- Create an SSH public and private key pair for Linux VMs (转载)
- 28.日志路由组件
- 汇编语言在屏幕指定位置输出字符串
- 双摄像头系列(3)原理深度剖析(电子行业人士必看)
- sessionStorage 、localStorage 和 cookie 对比区分
- maven学习、工作总结
- html5学习笔记(六)(摘抄讲义加部分理解)--布局
- 分代垃圾回收
- 25个提高效率的Eclipse插件
- 2017 新的一年 新的开始