jlafon / ansible-profile

An Ansible plugin for timing tasks
http://jlafon.io/ansible-profiling.html
MIT License
342 stars 57 forks source link

Use display() rather than print() #8

Open mideeks opened 9 years ago

mideeks commented 9 years ago

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