Home > Backend Development > PHP Tutorial > How to output a certain variable in nginx log

How to output a certain variable in nginx log

WBOY
Release: 2016-08-04 09:19:05
Original
4237 people have browsed it

The code is PHP, running on nginx, and part of it is the function of sending emails.
In order to facilitate debugging, I want to output a certain variable,
but I don’t know where to output it, and how to output it?
You can console.log() directly in node, but how to output it in php on nginx?
On the Internet, it says that the log format is changed. Can I still use echo?
I don’t quite understand. Can I echo it directly? Where is the output?
Please give me some advice,

Reply content:

The code is PHP, running on nginx, and part of it is the function of sending emails.
In order to facilitate debugging, I want to output a certain variable,
but I don’t know where to output it, and how to output it?
You can console.log() directly in node, but how to output it in php on nginx?
On the Internet, it says that the log format is changed. Can I still use echo?
I don’t quite understand. Can I echo it directly? Where is the output?
Please give me some advice,

nginx log records are not output using php. You should modify the nginx/conf/ngnix.conf file
Change the format behind log_format. Different parameters correspond to different values. You can take a look

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