nginx log format - Go语言中文社区

nginx log format


分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

                 

nginx - log_format

log_format

 

syntax: log_format name format [format ...]

default: log_format combined "..."

context: http server

Directivelog_format describes the format of a log entry. Besides generalvariables in the format it is possible to use variables which existonly at the moment of record into the log:

The headers, transmitted to client, begin from the prefix "sent_http_", for example, $sent_http_content_range.

Notethat variables produced by other modules can also be logged. Forexample you can log upstream response headers with the prefix"upstream_http_", see upstream.

In the configuration there is always a predetermined format "combined":

 

log_format  combined  '$remote_addr - $remote_user [$time_local] '
                      '"$request" $status $body_bytes_sent '
                      '"$http_referer" "$http_user_agent"';

[log_format文档]

http://wiki.codemongers.com/NginxHttpLogModule#log_format

[相关问题]

log_format

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow

这里写图片描述
版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/yffkjhg/article/details/83828199
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-03-07 10:49:59
  • 阅读 ( 1073 )
  • 分类:Go Web框架

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢