LOGSWAN(1)

🦒 NAME

okay bestie, meet logswan β€” she's a fast Web log analyzer that runs on probabilistic data structures ✨ like she's literally that girl.


πŸ“œ SYNOPSIS

logswan [-ghv] [-d db] logfile

πŸ’– DESCRIPTION

So logswan is a fast Web log analyzer using probabilistic data structures, and no I'm not being dramatic, that's literally what she is πŸ’…. She's built for very large log files, like typically APIs logs β€” the kind of file that makes other tools start sweating 😭.

Here's the iconic part: her memory usage is constant no matter how big the log file is 🫢. Doesn't matter if the log is 10MB or 10TB, she's not out here gobbling RAM. She takes approximatively 4MB of RAM. That's it. That's the whole budget. Queen behavior πŸ‘‘.

Counting unique visitors? She does that with two HyperLogLog counters β€” one for IPv4, and another one for IPv6 β€” and that gives a relative accuracy of 0.10% 🌸. Probabilistic, but make it precise.

Oh and btw, if file is a single dash (`-`), logswan reads from the standard input ✨. Very demure, very stdin-pilled.

The options are as follows:

  • -d db β€” Specify path to a GeoIP database.
  • -g β€” Enable GeoIP lookups.
  • -h β€” Display usage.
  • -v β€” Display version.

🌈 EXAMPLES

okay so here's a lil script that processes all log files in the current directory and saves the output in a file β€” it's giving automation, it's giving efficiency, it ate πŸ”₯:

#!/bin/sh
for file in $(ls *.log)
do
        logswan $file > $file.json
done
exit 0

πŸŽ€ AUTHORS

logswan was written by Frederic Cambus. shoutout to the dev fr fr 🫢


πŸ’€ reminder bestie: this page is the Debian build from February 13, 2026. mwah, go analyze some logs, you got this πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ’…
πŸ“¦ where this page comes from