Home  >  Article  >  Backend Development  >  Yii1.1 framework about the use of log configuration

Yii1.1 framework about the use of log configuration

不言
不言Original
2018-07-05 14:56:571550browse

This article mainly introduces the use of log configuration in the Yii1.1 framework. It has certain reference value. Now I share it with you. Friends in need can refer to it.

I have recently started to get involved with new projects. The framework used in the project is Yii version 1.1. By reading the framework documentation, I have a general understanding of the use of Yii in logging.

First add log-related configurations to the protected/config/main.php configuration file, as shown below:

CFileLogRoute means generating file logs when the program runs When error and warning errors occur, the log will be output. The default is protected/runtime/application.log, as shown below:

CWebLogRoute means to directly output logs of type trace at the bottom of the web page. system.db.* means to only record db operations and ignore others, as shown below:

The above is the entire content of this article. I hope it will be helpful to everyone's study. For more related content, please pay attention to the PHP Chinese website!

Related recommendations:

yii2 Use GridView::widget in template twig

##Laravel to modify the default log file name and location

The above is the detailed content of Yii1.1 framework about the use of log configuration. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn