# Possible to get more detailed logs to STDOUT?

**URL:** <https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487>\
**Category:** Feature Requests & Feedback\
**Created:** [February 5, 2018, 11:19am UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487 "2018-02-05T11:19:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony\_s](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tony\_s](https://discuss.konghq.com/u/tony_s)\
**Post date:** [February 5, 2018, 11:19am UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/1 "2018-02-05T11:19:49Z")

</div>

We have Kong (0.11.1) running on Kubernetes. We use OMS-agent to send the logs (stdout/stderr) to a central location. And this is working fine. Currently when Kong handles and API call, it logs the request URI and the response code. For normal operation this is sufficient but for troubleshooting purposes it would be nice to have more data in the logs, such as request headers etc.  
I tried the TCP/UDP/File log plugins and they seem to have the needed information in the output but is it possible to have similar information directly to stdout with some existing plugin so that all our logs would go to central location via same route? Preferably something that could be just turned on for the time that the troubleshooting activities are ongoing and after that turned off.

---

<div class="post-metadata">

**Author:** ![thibaultcha](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/thibaultcha/32/340_2.png) [@thibaultcha](https://discuss.konghq.com/u/thibaultcha)\
**Post date:** [February 5, 2018, 6:16pm UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/2 "2018-02-05T18:16:10Z")

</div>

Hi,

Currently not possible. Logging plugins will give you traffic logs (including request/response headers). It is worth noting that you can customize the [access\_log](https://nginx.org/en/docs/http/ngx_http_log_module.html#access_log) directive of NGINX to a format of your choosing (see the NGINX documentation).

A possible workaround would be to update the [proxy\_access\_log](https://getkong.org/docs/0.12.x/configuration/#proxy_access_log) Kong configuration value. I haven’t tried but something like this could work:

```auto
# kong.conf
proxy_access_log = logs/proxy_access.log '$remote_addr - [$time_local] "$request" $status "$http_user_agent"'

```

Give it a try.

You can also use a custom NGINX template for more fine grained control or if the above solution doesn’t work for some reason (and if not, a pull request would be welcome!).

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [February 6, 2018, 12:23am UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/3 "2018-02-06T00:23:56Z")

</div>

I think I posted a similar thread a few weeks back, check out - [https://github.com/edenlabllc/kong-plugin-stdout-log](https://github.com/edenlabllc/kong-plugin-stdout-log) . I used it for awhile before switching to logging to splunk. Works like a charm and i think meets your use case!

---

<div class="post-metadata">

**Author:** ![tony\_s](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tony\_s](https://discuss.konghq.com/u/tony_s)\
**Post date:** [February 12, 2018, 8:40pm UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/4 "2018-02-12T20:40:56Z")

</div>

Yes, thanks. I tried the plugin and it was exactly what I needed.

---

<div class="post-metadata">

**Author:** ![jeremyjpj0916](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/jeremyjpj0916/32/1388_2.png) [@jeremyjpj0916](https://discuss.konghq.com/u/jeremyjpj0916)\
**Post date:** [February 12, 2018, 11:00pm UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/5 "2018-02-12T23:00:01Z")

</div>

Glad to hear! Hope it works well for yah bud.

---

<div class="post-metadata">

**Author:** ![rkbasa](https://avatars.discourse-cdn.com/v4/letter/r/ecb155/32.png) [@rkbasa](https://discuss.konghq.com/u/rkbasa)\
**Post date:** [August 23, 2018, 2:25am UTC](https://discuss.konghq.com/t/possible-to-get-more-detailed-logs-to-stdout/487/6 "2018-08-23T02:25:30Z")

</div>

I have configured the stdout-log plugin in my kong cluster running on aws ecs containers. Also configured the cloudwatch but dont see any logs in the cloudwatch. Not sure what i am missing.
