How does logging work in Ecto/Postgrex?

According to the changelog, logging has been supported in Postgrex since 2016. But I can’t find any examples / documentation.

In particular, I expected seeing messages in my iex terminal, but they’re not showing up. They’re being raised from postgres using syntax like:

RAISE NOTICE 'This is an important message';

Any idea on how I can get a handle on DEBUG, LOG, INFO, NOTICE or WARNING messages raised from postgres in elixir?

I’d doubt that “logging” means logs of postgres. I’d rather expect logging to be what postgrex does.

You cannot.


Yes, I was over-thinking it. The best solution here is to tail the postgres log directly.