linux - apache如果格式化错误日志的所记录的时间
大家讲道理
大家讲道理 2017-04-17 11:43:15
0
1
220

apache的错误日志中所记录的时间很别扭,请问如何格式化呢?

[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdocs/test

调整为

[2000/10/11 14:32:52] [error] [client 127.0.0.1] client denied by server configuration: /export/home/live/ap/htdocs/test
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
PHPzhong

Change the configuration in httpd.conf LogFormat "%{%Y/%M/%d}t"%r" %>s %b" common
For details, please refer to the man pages of mod_log_config and strftime.

The time format can use the time format of strftime.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!