-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(p2p): don't log empty order packets #1871
Conversation
This skips the log statement that logs when a peer sends us zero orders for a given trading pair, as this is more or less a non-event and is currently logged fairly frequently. It also lowers the level of logging when we do get orders from `verbose` to `debug` as it is a common and not particularly important event.
Not sure that we should remove receiving if sending is still logging. Otherwise we have case when we see sending on peer side in the logs, but dont see receiving on our side. It would be better to remove sending for such case or just do nothing. WDYT @sangaman @erkarl ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above
Agree, that we should ommit logs on the sending side in the case of "no orders" too.
Not sure I understand. The sender still needs to send the empty order packet, otherwise the receiver doesn't know the sender doesn't have any orders for that pair. |
So, it looks pretty strange - "Lets not log 0 order packets because there is too much such strings in logs, but we still will log non-empty order packets" U said that sending empty order packet is required action, then it definitely SHOULD be logged, there is no difference between empty order packet and non-empty, both are required. And if we will log sending, we need to log receiving too. (Sending it is an action that should be logged and logging should not be based on action parameters (2 or 0 orders).) Then maybe lets just move this logging to trace level and will not omit it? |
I agree with not logging empty order packets when they're being sent, I wasn't aware that was being done but I'll go check and make sure again.
So we do indeed need the empty orders packet on a p2p level, as kilian said. We already log every single packet on trace level (here https://github.com/ExchangeUnion/xud/blob/master/lib/p2p/Peer.ts#L797), so when we really want to track every single action we'll be able to see that. I was just thinking that we don't need additional logging for empty order packets, particularly at the |
This skips the log statement that logs when a peer sends us zero orders for a given trading pair, as this is more or less a non-event and is currently logged fairly frequently. It also lowers the level of logging when we do get orders from `verbose` to `debug` as it is a common and not particularly important event.
This skips the log statement that logs when a peer sends us zero orders for a given trading pair, as this is more or less a non-event and is currently logged fairly frequently. It also lowers the level of logging when we do get orders from
verbose
todebug
as it is a common and not particularly important event.