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

win_xml: Hide warnings on element operation, unless debug or count is set #324

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

anthonylavado
Copy link
Contributor

SUMMARY

When running win_xml to add an element, it will display warnings in the output as it enumerates the multiple children in the element you've selected. This hides those behind the debug flag, as the warnings are simply displaying names of the element currently being looked at, and the count of total elements.

Fixes #205.
Partially addresses #210.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

win_xml

ADDITIONAL INFORMATION

This is my first contribution here, please let me know if this needs improvement. Thanks!

Puts the element warnings in the debug flag, so they do not appear under normal circumstances.
Adds $count as a trigger for the message that includes the number of elements enumerated.
@jborean93
Copy link
Collaborator

Honestly at this point I think the warnings should go. These are clearly more debug logging attempts and was probably used during development to get info back to the controller for debugging.

We have a logging mechanism in the newer Ansible.Basic setup but unfortunately this module doesn't use that so I think we can probably just remove the lines altogether.

@anthonylavado
Copy link
Contributor Author

@jborean93 That's much easier then. I'll update this to just pull those lines.

anthonylavado and others added 2 commits October 30, 2021 17:12
Removed the add-warning statements entirely, and the strings that were
used in them.
@jborean93
Copy link
Collaborator

Thanks for the PR @anthonylavado, I've pushed a commit which removed a stray } and added the changelog fragment.

@jborean93 jborean93 merged commit caea37b into ansible-collections:main Nov 1, 2021
@anthonylavado
Copy link
Contributor Author

Thanks for the fix up! If I come across anything else that I can fix in my travels, I'll send along a PR.

@anthonylavado anthonylavado deleted the hide-warnings branch November 1, 2021 22:21
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.

win_xml module warnings about xml nodes and elements
2 participants