Elasticsearch:关闭单个本地节点的日志记录 [英] Elasticsearch: Turn off logging for a single local node

查看:143
本文介绍了Elasticsearch:关闭单个本地节点的日志记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地节点,我正在初始化并连接到

I have a single local node which I'm initializing and connecting to with

node = NodeBuilder.nodeBuilder ().local (true).node ();
node.start ();
Settings settings = ImmutableSettings.settingsBuilder ()
            .put ("node.local", "true").build ();
client = new TransportClient (settings)
            .addTransportAddress (new LocalTransportAddress ("1"));

当我使用客户端时,输出了大量的调试日志记录。有没有办法禁用日志记录?

When I use the client, there's a massive amount of debug logging that's outputted. Is there any way to disable to the logging?

推荐答案

它使用log4j,所以只要包含一个log4j, code> log4j.properties 文件以控制日志记录级别。

It uses log4j, so just include a log4j, so just include a log4j.properties file to control the logging level.

例如,您可以让它只包含此行 log4j.rootLogger = ERROR,stdout 只输出错误

For example you can have it contain only this line log4j.rootLogger=ERROR, stdout to only output errors

这篇关于Elasticsearch:关闭单个本地节点的日志记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆