我可以通过Corda节点很好地控制日志记录吗 [英] Can I finely control logging by Corda nodes

查看:20
本文介绍了我可以通过Corda节点很好地控制日志记录吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更好地控制Corda节点的日志记录?log4j2.xml文件是唯一的地方吗?例如,我能否仅关闭 I 15:37:04 89 NodeVaultService._queryBy-保险柜查询合同类型:等消息?

How can I control logging from corda nodes better? Is the log4j2.xml file the only place? Can I, for instance, only turn off the I 15:37:04 89 NodeVaultService._queryBy - Vault Query for contract type: etc messages?

推荐答案

您不能关闭特定消息,但是节点的日志记录配置文件可以指定每个类应在其上打印消息的级别.例如,您可以指定 net.corda.node.services.vault.NodeVaultService 类仅应打印 WARN 或更高版本的消息,这将过滤掉该消息以上(以及来自 NodeVaultService 的任何其他 INFO 级消息.

You cannot turn off specific messages, but your node's logging configuration file can specify the level each class should print messages at. For example, you could specify that the net.corda.node.services.vault.NodeVaultService class should only print messages that are WARN or above, which would filter out the message above (as well as any other INFO-level messages from the NodeVaultService.

您可以在此处找到有关如何执行此过滤的说明:

You can find instructions on how to perform this filtering here: How to stop node from logging node.conf during startup.

这篇关于我可以通过Corda节点很好地控制日志记录吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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