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

Some logging messages impact XML formatting #280

Closed
111pontes opened this issue Oct 26, 2016 · 1 comment
Closed

Some logging messages impact XML formatting #280

111pontes opened this issue Oct 26, 2016 · 1 comment

Comments

@111pontes
Copy link
Collaborator

A NETCONF OK message received from the server as:

2016-10-26 11:32:59,054 - ydk.providers.NetconfServiceProvider - DEBUG - 
<?xml version="1.0"?>
<rpc-reply message-id="urn:uuid:82faf7c7-760b-40f6-91f7-14ab7ea7e3e6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <ok/>
</rpc-reply>

is displayed in the logs as:

2016-10-26 11:34:10,159 - ydk.providers.NetconfServiceProvider - DEBUG - <?xml version="1.0" ?>
<rpc-reply message-id="urn:uuid:bcc82072-46d0-4e34-ac65-2c7bd5726044" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">


  <ok/>


</rpc-reply>

Should also impact log formatting for config or operational data read from the NETCONF server.

111pontes added a commit to 111pontes/ydk-gen that referenced this issue Oct 26, 2016
Removes whitespace between elements if present and then pretty prints
XML string. Leading or trailing whitespace is preserved in text content.
No spurious new lines are present anymore.
ghost pushed a commit that referenced this issue Oct 27, 2016
* Fix XML pretty print in logs (#280)

Removes whitespace between elements if present and then pretty prints
XML string. Leading or trailing whitespace is preserved in text content.
No spurious new lines are present anymore.

* Fix UTF-8 encoding for logging
@111pontes
Copy link
Collaborator Author

Fixed in 471809f

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

No branches or pull requests

1 participant