# Log registered data on task failure

**URL:** <https://forum.ansible.com/t/log-registered-data-on-task-failure/36400>\
**Category:** Ansible Project\
**Created:** [March 4, 2022, 6:36pm UTC](https://forum.ansible.com/t/log-registered-data-on-task-failure/36400 "2022-03-04T18:36:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satya\_Narayana](https://avatars.discourse-cdn.com/v4/letter/s/7feea3/32.png) [@Satya\_Narayana](https://forum.ansible.com/u/Satya_Narayana)\
**Post date:** [March 4, 2022, 6:36pm UTC](https://forum.ansible.com/t/log-registered-data-on-task-failure/36400/1 "2022-03-04T18:36:40Z")

</div>

Hi team,

Some of the tasks in my playbook register some date and I am using that data in the next tasks. Task which is consuming the previously registered data fails for some reason I want to log all the registered data only on task failure is there a way that I can log only on task failure ??

Thanks in Advance  
Thanks,  
Satya
