Skip to content
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

cleanup logging #366

Merged
merged 2 commits into from
Jan 11, 2020
Merged

cleanup logging #366

merged 2 commits into from
Jan 11, 2020

Conversation

vnitinv
Copy link
Contributor

@vnitinv vnitinv commented Jan 6, 2020

Fix #364

Before fix

we don't need to put debug for different listeners. It unnecessarily put same log message for different listener multiple times.
In case of huge XML output, logging becomes clumsy

DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 51814] dispatching message to <ncclient.transport.session.NotificationHandler object at 0x108c162e8>: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c8fefa58-5cc8-478e-8e60-e340b9409c1a">
....
</rpc-reply>
DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 51814] dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x1086fa588>: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c8fefa58-5cc8-478e-8e60-e340b9409c1a">
....
</rpc-reply>
DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 51814] dispatching message to <jnpr.junos.device.DeviceSessionListener object at 0x1086fa5f8>: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c8fefa58-5cc8-478e-8e60-e340b9409c1a">
....
</rpc-reply>

After fix

DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 53967] dispatching message to different listeners: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/19.3R0/junos" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:940d1cfc-623d-43d1-afc7-d8d1f1eb9990">
....
</rpc-reply>
DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 53967] dispatching message to listener: <jnpr.junos.device.DeviceSessionListener object at 0x108010668>
DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 53967] dispatching message to listener: <ncclient.transport.session.NotificationHandler object at 0x108526358>
DEBUG:ncclient.transport.ssh:[host 10.221.130.141 session-id 53967] dispatching message to listener: <ncclient.operations.rpc.RPCReplyListener object at 0x1080105f8>

@vnitinv vnitinv mentioned this pull request Jan 6, 2020
@einarnn einarnn self-assigned this Jan 11, 2020
@einarnn einarnn self-requested a review January 11, 2020 20:52
@einarnn einarnn merged commit 80097e1 into ncclient:master Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debug log for different listener blot log file
2 participants