# PHP APM Agent log in json or save to file

**URL:** <https://discuss.elastic.co/t/php-apm-agent-log-in-json-or-save-to-file/308570>\
**Category:** APM\
**Tags:** php\
**Created:** [June 30, 2022, 12:14pm UTC](https://discuss.elastic.co/t/php-apm-agent-log-in-json-or-save-to-file/308570 "2022-06-30T12:14:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Machacek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jan_machacek/32/107769_2.png) [@Jan\_Machacek](https://discuss.elastic.co/u/Jan_Machacek)\
**Post date:** [June 30, 2022, 12:14pm UTC](https://discuss.elastic.co/t/php-apm-agent-log-in-json-or-save-to-file/308570/1 "2022-06-30T12:14:07Z")

</div>

**APM Agent language and version** : PHP 1.5.2

Hi,  
We want to send log from PHP Apm agent to Kibana so It would be useful to save this output to file or convert it to json.

If I understad correctly the documentation [Configuration | APM PHP Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/php/current/configuration.html#configure-logging), Apm client log output is accessible only from stdout or stderr in plain text.

Is some possibility to format this log to json or save it to the file?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2022, 8:14am UTC](https://discuss.elastic.co/t/php-apm-agent-log-in-json-or-save-to-file/308570/2 "2022-07-21T08:14:28Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
