Logflare - Tail -f your Cloudflare Logs

I had an idea for an app a few months ago and figured it was a good opportunity to learn Elixir. It’s all open source at https://github.com/Logflare/logflare. This forum helped me a lot so hopefully someone finds this useful.

Logflare lets you tail -f your Cloudflare logs (or any file with the agent). This project let me play with a lot of different aspects of Elixir, Erlang and Phoenix. Using ETS to store the logs. Phoenix for the framework. API endpoint to ingest logs and handle some back and forth with Cloudflare for the Cloudflare app. Genservers for watching log files and managing the ETS tables. Dynamic Supervisors for the load tester. Plug for verifying API requests. Phoenix channels to stream to your browser.

Looking for anyone interested in playing with it. You can get logs from Cloudflare for free if you use the app because workers via an app are currently free.

We don’t store a lot of logs but you can create rules that match log entries with regex and put them in their own source to save. Useful for collecting 5xx, 4xx, bot requests etc.

Another cool feature … you can generate a public url for a source so you can share it without a login. Which was super easy with Phoenix’s router.

All said and done this whole thing was surprisingly straight forward with Elixir and Phoenix!

Also taking feature requests so let me know what would be useful for you if you want to use it.

6 Likes