国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發(fā)設計 > 正文

28.日志路由組件

2019-11-10 19:43:34
字體:
供稿:網(wǎng)友

日志記錄 這里寫圖片描述 這里寫圖片描述

[php]array( ...... '這里寫圖片描述 這里寫圖片描述


*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', ), // // 開發(fā)過程中所有日志直接輸出到瀏覽器了,這樣不需要登錄服務器看日志了 array( 'class' => 'CWebLogRoute', 'categories' => 'test.*', 'levels' => CLogger::LEVEL_PROFILE, 'showInFireBug' => true, 'ignore
AjaxInFireBug' => true, ), array( 'class' => 'CWebLogRoute', 'categories' => 'test.* ', ), array( 'class'=>'CEmailLogRoute', 'levels'=>'error, warning', 'emails'=>'admin@example.com', ), ), ), ),

這里寫圖片描述


這里寫圖片描述 這里寫圖片描述 這里寫圖片描述

'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array(//數(shù)據(jù)庫日志記錄到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(//因為用戶中心很重要,所有的用戶中心錯誤日志需要離開發(fā)郵件 'class'=>'CEmailLogRoute', 'categories'=>'uc.*', 'levels'=>'error', 'emails'=>'admaker@baidu.com', ), array(//開發(fā)過程中,把所有的日志直接打印到頁面底部,這樣就不需要登錄服務器看日志了 '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


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 隆子县| 仁怀市| 灵台县| 内丘县| 交城县| 延吉市| 登封市| 米易县| 佳木斯市| 华容县| 黑龙江省| 辉县市| 宜州市| 汉沽区| 进贤县| 揭东县| 昂仁县| 宜黄县| 修武县| 辽中县| 正定县| 南漳县| 高唐县| 友谊县| 乌鲁木齐县| 芒康县| 吉安市| 凤冈县| 新源县| 米易县| 陆丰市| 平安县| 沈阳市| 岳西县| 德兴市| 同仁县| 丹东市| 平原县| 天峨县| 岳池县| 石泉县|