{"nx_localtime@timestamp":"27/Sep/2018:21:37:17 +0800","nx_host":"156.237.192.218","nx_client_ip":"113.61.62.154","nx_body_size":665,"nx_request_time":0.000,"nx_scheme":"http","nx_http_host":"log.2481888.com","nx_request_method":"GET","nx_uri":"/nginx/","nx_status":"200","nx_referer":"http://log.2481888.com/","nx_agent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36","nx_upstream_host":"","nx_upstream_response_time":"","nx_upstream_response_length":"","nx_upstream_status":"","nx_upstream_connect_time":""}
(2)、java日志格式配置:
利用spring cloud config配置中心的集中化管理java日志输出,修改统一的配置文件:
$ vim /data/www/java/log4j2.xml
<configuration status="INFO">
<!-- 参数配置 -->
<properties>
<property>${sys:project.name}</property>
<property>/log/${app_name}</property>