Yii framework 笔记之系统日志篇

原文地址:http://www.yiiframework.com/doc/guide/topics.logging

系统日志在yii配置里面是需要preload的。

 

在yii里面有两个记录系统时间的函数

其中,在第一个函数中,我们看到了level一词,通过这个来定义事件的等级。分成如下等级。(分等级能够在事件的提取中获益)

  • trace: this is the level used by Yii::trace. It is for tracing the execution flow of the application during development.

  • info: this is for logging general information.

  • profile: this is for performance profile which is to be described shortly.

  • warning: this is for warning messages.

  • error: this is for fatal error messages.

  •  

    2.日志路由,或者叫做转发器。这个实现了一个功能,就是在系统发生错误的时候,能够将相关信息发送到指定的多种目的地,比如邮箱,手机等。

    这个转发规则使用了用文件来记录,级别为error。还有一个过滤器。filter

    3.代码的性能评估。

    包括两个方面,一个是 sql代码的性能,一个是php代码。通过一个日志功能来实现。

    Performance Profiling

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值