zoukankan      html  css  js  c++  java
  • Nginx LOG阶段里log模块

    L68

    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 通过变量判断日志是否记录

    ->日志缓存 提高IO性能 比如 每次都要写入到文件里 可能需要耗时几十毫秒,也造成机械硬盘磁头旋转写入 假如用缓存至一定的大小再写入的话 会有很大的性能优化

    Syntax: open_log_file_cache max=N [inactive=time] [min_uses=N] [valid=time];
    open_log_file_cache off;
    Default:
    open_log_file_cache off;
    Context: httpserverlocation

    ->日志压缩 批量压缩内存日志 再写入缓存

  • 相关阅读:
    js使用笔记
    rabbit-mq使用官方文档
    tomcat Enabling JMX Remote
    Venom的简单使用
    Random模块
    时间模块
    shulti模块简述
    Python的os模块
    Python压缩及解压文件
    Kali的内网穿透
  • 原文地址:https://www.cnblogs.com/jackey2015/p/10387713.html
Copyright © 2011-2022 走看看