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

yii2 custom program access log

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-06 13:51:43
Original
1402 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:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template