为 ElasticSearch Java Rest Client 禁用跟踪程序包的跟踪日志记录
Disable trace logging for tracer package for ElasticSearch Java Rest Client
我正在通过 ElasticSearch 6.3 Java Rest Client 进行批量索引操作。
数据已正确编入索引,但 restclient 正在文件中打印大量日志。见下文:
2018-08-14 16:25:42,614 DEBUG [User=] [tracer] curl -iX POST 'http://1.2.3.4:9202/_bulk?timeout=1m' -d '{"create":{"_index":"ms","_type":"doc","_id":"24218000","version":-4}}
{"create":{"_index":"ms","_type":"doc","_id":"24217999","version":-4}}
{"data":"test","year":2018,"corrid":"24217999","mode":"USPS","emailaddress":"","mimeType":"application/octet-stream","title":"some title","type":"app","maildate":"2018-01-02","code":"abx","direction":"out","quarter":0,"no":"222876"}
{"create":{"_index":"ms","_type":"doc","_id":"24218345","version":-4
如何禁用或限制此功能?
This文档讲了一点点,但是没有给出足够的信息清楚。
我同意他们的文档含糊不清。
听起来你有一个像
这样的条目
<logger name="tracer" level="TRACE" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
或
tracer.level=TRACE
正在导入 commons-logging
配置中的某处。至少,我认为您可以将级别设置为 WARN
或 ERROR
以消除喋喋不休。
如 xeraa 所述,您可能还为 org.elasticsearch.client
、org.elasticsearch.client.RestClient
、org.elasticsearch.client.sniffer
等
设置了过高的记录器级别
我正在通过 ElasticSearch 6.3 Java Rest Client 进行批量索引操作。
数据已正确编入索引,但 restclient 正在文件中打印大量日志。见下文:
2018-08-14 16:25:42,614 DEBUG [User=] [tracer] curl -iX POST 'http://1.2.3.4:9202/_bulk?timeout=1m' -d '{"create":{"_index":"ms","_type":"doc","_id":"24218000","version":-4}}
{"create":{"_index":"ms","_type":"doc","_id":"24217999","version":-4}}
{"data":"test","year":2018,"corrid":"24217999","mode":"USPS","emailaddress":"","mimeType":"application/octet-stream","title":"some title","type":"app","maildate":"2018-01-02","code":"abx","direction":"out","quarter":0,"no":"222876"}
{"create":{"_index":"ms","_type":"doc","_id":"24218345","version":-4
如何禁用或限制此功能?
This文档讲了一点点,但是没有给出足够的信息清楚。
我同意他们的文档含糊不清。
听起来你有一个像
这样的条目<logger name="tracer" level="TRACE" additivity="false">
<appender-ref ref="CONSOLE" />
</logger>
或
tracer.level=TRACE
正在导入 commons-logging
配置中的某处。至少,我认为您可以将级别设置为 WARN
或 ERROR
以消除喋喋不休。
如 xeraa 所述,您可能还为 org.elasticsearch.client
、org.elasticsearch.client.RestClient
、org.elasticsearch.client.sniffer
等