QuickFixengine:可以限制日志记录吗?
在 quickfixengine 中是否有一个设置可以指定日志级别以限制消息数量已登录? 看来我们登录了很多数据,所以我们想限制一下。 我认为记录太多消息会影响性能(没有任何支持或反对的硬数据)。
In quickfixengine is there a setting to specify the log level to restrict number of messages logged? It seems that we are login a lot of data so we would like to restrict it bit. I assume that logging too many messages should affect performance (don't have any hard data for or against).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有说明您使用的是哪种语言,但我相信这应该适用于 C++ 和 Java API。
您需要实现自己的 LogFactory 和 Log 类(前者负责创建后者的实例)。 然后,您将自定义
LogFactory
的实例传递给您的Initiator
或Acceptor
实例。 您将在Log
类中进行消息过滤。了解 Log 接收字符串形式的消息,因此您需要过滤使用字符串匹配操作或将字符串转换回 Messages 然后使用标签进行过滤,尽管这最终可能会减慢您的速度,而不仅仅是允许记录所有消息。
You don't say which language you're using but I believe that this should work with both the C++ and Java APIs.
You will need to implement your own LogFactory and Log classes (the former is responsible for creating instances of the latter). Then you'll pass an instance of your custom
LogFactory
to yourInitiator
orAcceptor
instance. YourLog
class is where you will do the message filtering.Understand that Log receives messages in string form, so you'll need to filtering either with string matching operations or convert the strings back to Messages and then filter using tags, though this may end up slowing you down more than just allowing all messages to be logger.