Home > Backend Development > PHP Tutorial > yii2 custom program access log

yii2 custom program access log

WBOY
Release: 2016-07-06 13:51:43
Original
1353 people have browsed it

Question

The project is developed using yii2 and needs to record all accessed access_log custom formats. Now we are encountering the following problems

  1. Don’t know where to write a log?

  2. I don’t know how to dynamically obtain the accessed controller action

Reply content:

Question

The project is developed using yii2 and needs to record all accessed access_log custom formats. Now we are encountering the following problems

  1. Don’t know where to write a log?

  2. I don’t know how to dynamically obtain the accessed controller action

  1. If it is not very complicated, you can directly use nginx’s access_log

  2. You can print Yii::$app to see that both `controller and action

  3. are used in the current request.
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template