# Logtree

**URL:** <https://forum.ansible.com/t/logtree/12201>\
**Category:** Ansible Project\
**Created:** [January 14, 2013, 1:02pm UTC](https://forum.ansible.com/t/logtree/12201 "2013-01-14T13:02:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [January 14, 2013, 1:02pm UTC](https://forum.ansible.com/t/logtree/12201/1 "2013-01-14T13:02:00Z")

</div>

Dear All,

I see that the **ansible** program has the option of saving it’s output in a logfile somewhere:  
**-t TREE, --tree=TREE log output to this directory**

But ansible-playbook seems to miss such a feature.

I’d like to be able to have other people in our team review what my playbook session did (And vice-versa). Is there a proper way of doing so? Or should I invest some time in a callback plugin?

Thanks,  
Mark

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [January 14, 2013, 1:57pm UTC](https://forum.ansible.com/t/logtree/12201/2 "2013-01-14T13:57:20Z")

</div>

A callback plugin is the intended way to write a custom logger, yes.

The tree layout wouldn't really make sense for an entire playbook run.

---

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [January 14, 2013, 5:26pm UTC](https://forum.ansible.com/t/logtree/12201/3 "2013-01-14T17:26:49Z")

</div>

Good, thats allright then.

Is there documentation anywhere about the callback plugin system?  
I mean a bit more then: [http://ansible.cc/docs/api.html?highlight=callback#callback-plugins](http://ansible.cc/docs/api.html?highlight=callback#callback-plugins) ?

Or even this: [http://jpmens.net/2012/09/11/watching-ansible-at-work-callbacks/](http://jpmens.net/2012/09/11/watching-ansible-at-work-callbacks/)?

Thank,  
Mark

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [January 14, 2013, 6:49pm UTC](https://forum.ansible.com/t/logtree/12201/4 "2013-01-14T18:49:07Z")

</div>

There are several live examples in addition to the API docs:

[https://github.com/ansible/ansible/tree/devel/plugins/callbacks](https://github.com/ansible/ansible/tree/devel/plugins/callbacks)

---

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [January 14, 2013, 6:58pm UTC](https://forum.ansible.com/t/logtree/12201/5 "2013-01-14T18:58:39Z")

</div>

Agreed but there not commented, and way above my python-skilzzz ( 😉 )

I’m a stinking old Linux admin with Bash skils, so I’ll be creating my callbacks in Bash, but I do not know how the whole thing works.  
I mean, what do I do to have the callback run, and what get’s passed to it and it what form, etc??

Any other examples?

Thanks!  
Mark

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [January 14, 2013, 7:08pm UTC](https://forum.ansible.com/t/logtree/12201/6 "2013-01-14T19:08:01Z")

</div>

Comments, well, it's intended that you read the source and see where  
the individual names come up if you need more understanding. They are  
intentionally rather low level.

[https://github.com/ansible/ansible/blob/devel/lib/ansible/callback\_plugins/noop.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/callback_plugins/noop.py)

It always runs automatically if in the proper directory. These are  
configured either in your config file or you can just drop it in the  
systems one.

---

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [January 15, 2013, 5:53am UTC](https://forum.ansible.com/t/logtree/12201/7 "2013-01-15T05:53:05Z")

</div>

Aaah, I missed that part. So these scripts, as long as they are available, get run anyway, no need for a special something in the playbook.

Thanks!  
Mark
