
Show HN: MailgunLogger - pierot
https://github.com/jackjoe/mailgun_logger
======
dazbradbury
Awesome - we've slowly moved so many of the mailgun events into our own system
over the years, that it probably made sense to just start with an "everything'
approach to begin with!

I have asked mailgun a number of times if they'd simply charge for longer
storage limits, and they said no.

Thanks for setting this up!

------
28mm
Won't mailgun send all of the same information via event callbacks, or is
there event information only available through their web interface?

~~~
tehbeard
Not the author, but have some experience with the mailgun api. AFAIK there's
no sla/guarantee/redelivery for the webhooks, and they have to be setup for
each domain. Looping the account to fetch all logs for the last 48 hours is
relatively simple and robust.

~~~
jeroenbourgois
OP here (actually, he is my co-founder, same company). I can confirm this
experience, looping seems to work.

In our own setup, we fetch data for the last 24h twice a day and then just
insert everything. We have a db constraint on the message ID mailgun sends us,
so only news ones will be persisted. We aren't even bothered with filtering
before inserting, the db constraint does the trick.

------
cpursley
This is very timely! I'd love to see the logging bits extracted out into its
own library so I can use it directly in an existing Phoenix app. I don't
really need the GUI bits.

~~~
dqv
You should be able to still use it. Just set `runtime: false` for the dep
entry in your `mix.exs` file and only start what you need.

------
chasers
Elixir :)

