# Human-readable and JSON output

**URL:** <https://forum.ansible.com/t/human-readable-and-json-output/23333>\
**Category:** Ansible Project\
**Created:** [December 25, 2016, 12:46am UTC](https://forum.ansible.com/t/human-readable-and-json-output/23333 "2016-12-25T00:46:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Smift1](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Josh\_Smift1](https://forum.ansible.com/u/Josh_Smift1)\
**Post date:** [December 25, 2016, 12:46am UTC](https://forum.ansible.com/t/human-readable-and-json-output/23333/1 "2016-12-25T00:46:14Z")

</div>

I'd like to get the standard Ansible output on my terminal, but get JSON  
output to a log file. Is there a way to do that? Setting stdout\_callback  
to 'json' seems to give me JSON on stdout and nothing in the log file,  
which is almost the exact opposite of what I want... Adding --opposite-day  
to the command line didn't seem to help. Can this be done?

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Josh (jbs@care.com)

(apologies for the automatic corporate disclaimer that follows)

This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 6, 2017, 1:26am UTC](https://forum.ansible.com/t/human-readable-and-json-output/23333/2 "2017-01-06T01:26:45Z")

</div>

If you whitelist the syslog\_json plugin it should do what you want. There currently isn’t a ‘JSON to specific file’ plugin, but using either plugin as an example it should be easy to create.
