– JSON格式

  • 如何在Nginx中配置以JSON格式记录日志?

    在nginx中,使用JSON格式记录日志的配置示例如下:,,“,http {, log_format json_combined escape=json ‘{ “@timestamp”: “$time_iso8601”, “host”: “$remote_addr”, “clientip”: “$remote_addr”, “size”: $body_bytes_sent, “responsetime”: “$request_time”, “upstreamtime”: “$upstream_response_time”, “url”: “$uri”, “method”: “$request_method”, “status”: “$status”, “http_referer”: “$http_referer”, “http_user_agent”: “$http_user_agent”}’;, access_log /var/log/nginx/access.log json_combined;,},“

    2024-10-06
    09
免费注册
电话联系

400-880-8834

产品咨询
产品咨询
分享本页
返回顶部
云产品限时秒杀。精选云产品高防服务器,20M大带宽限量抢购  >>点击进入