How to do logging in Logflare and its installation on Cloudflare

How to do logging in Logflare

You just add your domain in InfinityFree and configure Cloudflare, it’s awesome. But seeing just a few charts on the CF dashboard may confuse you. This guide explains how to configure Logflare, get to know where your visitors are from, and what browser they’re using.

  1. Sign up for Logflare in here > Logflare | Cloudflare, Vercel & Elixir Logging
    You can use Google SSO, GitHub SSO, or traditional email and password creds :slight_smile:

  2. Once you’re in the Logflare dashboard, click New source, and name it YourDesiredName.all

  3. Your log source is created, and the Send logs to this source popup will show up. Scroll down until you’re on the Custom Cloudflare Worker section. Copy the worker code for later.

  4. Open the Cloudflare dashboard and head to Workers and Pages.

  5. In case you don’t have existing workers, click Create worker.

  6. You may change the worker name first, and click Deploy.

  7. Once your worker is created, click Edit code.

  8. Remove the existing code for Hello world, paste the worker code you get earlier from Logflare, and click Save and deploy.

  9. Go back to your worker’s Overview, and click Settings.

  10. Click Triggers and scroll to the Routes section.

  11. Click Add route, enter *.yourdomain.com/* on the Route field, select your CF zone that corresponds to your domain, and click Add route.

  12. Happy logging!

8 Likes