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

Use display() rather than print() #8

Open
mideeks opened this issue Jul 6, 2015 · 0 comments
Open

Use display() rather than print() #8

mideeks opened this issue Jul 6, 2015 · 0 comments

Comments

@mideeks
Copy link

mideeks commented Jul 6, 2015

Use from ansible.callbacks import display rather than print so it goes through the logger and shows up in what I have configured for my log_file. You can literally change the word "print" to "display" in your code and it'll work. Display has some other neat things like coloring too if you want.

See details here:
https://github.com/ansible/ansible/blob/5ce3988d8693357f671f3fbec43b2d3b862db5f6/v1/ansible/callbacks.py#L139

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