"I'm still interested in getting to know whether it is the preferred way to
log debug information and how to use it when running test_module."

I do a fair amount of print output actually.

But here's also a blog post I wrote previously:
http://michaeldehaan.net/post/35403909347/tips-on-using-debuggers-with-ansible

FWIW, I'd suggest you join ansible-devel for development topics, trying to
get that one a bit more active and this is probably a bit involved for
ansible-project.

Thanks!



On Sun, May 25, 2014 at 7:48 AM, Martin Jöhren <[email protected]> wrote:

> K, found the import issue. Just had to add it by myself in my module.
> I'm still interested in getting to know whether it is the preferred way to
> log debug information and how to use it when running test_module.
>
> Thx
> On May 25, 2014 8:14 AM, "Martin Jöhren" <[email protected]> wrote:
>
>> Hi,
>>
>> after some searching I did not find anything appropriate: I just want to
>> log some debug information in my on new module in libraries/cloud, so my
>> first attempt was to use vv, but when I import it
>>
>> from ansible.callbacks import vv, vvv
>>
>> it's always complaining about
>>
>> Traceback (most recent call last):
>>   File "/Users/m.joehren/.ansible_module_generated", line 72, in <module>
>>     from ansible.callbacks import vv, vvv
>>   File "/Users/m.joehren/matlockx/ansible/lib/ansible/callbacks.py", line
>> 18, in <module>
>>     import utils
>>   File "/Users/m.joehren/matlockx/ansible/lib/ansible/utils/__init__.py",
>> line 29, in <module>
>>     from ansible.utils.display_functions import *
>>   File
>> "/Users/m.joehren/matlockx/ansible/lib/ansible/utils/display_functions.py",
>> line 22, in <module>
>>     from ansible.callbacks import display
>> ImportError: cannot import name display
>>
>> Is it a python thing that i'm missing here (i'm more or less python
>> beginner)?
>> Anyhow, how should debug logging in modules be done? And when I use vv,
>> how can I pass that to the test-module command on the command line?
>>
>> Thanks in advance,
>>
>> Martin
>>
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/ansible-project/6KNvOD-yvHk/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>>
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/fa7a1c56-a7fd-49bd-8219-833e3462416a%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/fa7a1c56-a7fd-49bd-8219-833e3462416a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAKad_%2B0BRwgqJRA9%3DPWAVz2MefvRyZn2Y%3Dut1n4dS-2MAXSc2w%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAKad_%2B0BRwgqJRA9%3DPWAVz2MefvRyZn2Y%3Dut1n4dS-2MAXSc2w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxrh8Mv%2BuXEK-YQnfqCase5r%3DOd_Y3ZsP%3DVJnXrFvKrjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to