# Filter sensitive logging data

**URL:** <https://forum.elixirforum.com/t/filter-sensitive-logging-data/7564>\
**Category:** Questions\
**Tags:** ecto, logging, plug, phoenix\
**Created:** [August 6, 2017, 8:45am UTC](https://forum.elixirforum.com/t/filter-sensitive-logging-data/7564 "2017-08-06T08:45:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Phillipp](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/phillipp/32/10625_2.png) [@Phillipp](https://forum.elixirforum.com/u/Phillipp)\
**Post date:** [July 2, 2019, 11:19am UTC](https://forum.elixirforum.com/t/filter-sensitive-logging-data/7564/4 "2019-07-02T11:19:27Z")

</div>

I have the same situation right now. I am making a request to a remote system and if it fails, I log the entire HTTPoison response, which might contain login credentials. Currently:

```elixir
Body:
{:form, [{"email", "user@example.com"}, {"password", "secret1234"}]}

```

But maybe in the future, if the remote API accepts a JSON body, the body will be a JSON string. So something more general would be useful. A quick search on hex.pm didn’t yield any results.

---

_[View the full topic](https://forum.elixirforum.com/t/filter-sensitive-logging-data/7564)._
