Nginx log阶段里log模块

log_format 指令

syntax : name [escape =default|josn|none] string "....";

default : combined "...";

context : http 

access_log 指令

syntax : path [format [buffer=size] [gzip[=level]] [flush=time] [if=condition]];

    access_log off;

default : logs/access.log combined;

context : http,server,location,if in location,limit_except

-> path 指定日志路径 也可以是变量 不开启cache 时 每条日志都需要IO开销 非常好性能 

->if 通过变量判断日志是否记录

->日志缓存

猜你喜欢

转载自www.cnblogs.com/jackey2015/p/10387713.html