Start a project

Tool 189 of 194 · Server

Log Pattern Miner

Turn a wall of log lines into a short list of patterns, with how often each happens and what changes from line to line.

Log Pattern Miner

Log lines

Mask before mining

Patterns

LinesShareLevelPatternVariable parts (most common values)First line

    Top patterns

    Lower similarity merges more lines into each pattern; higher splits them. Tree depth is how many leading words must match exactly before lines are compared. The results were checked against the drain3 library on over 160,000 real log lines.

    Export

    Patterns as CSV

    01

    What it does

    Mines the patterns in a log with the Drain algorithm, so thousands of lines become a short list of templates with counts, levels and the values that vary.

    • The Drain algorithm, matching the drain3 library's results line for line
    • Masks for times, IP addresses, UUIDs, hex IDs and numbers before mining
    • Strips leading timestamps and syslog headers so the message is what gets grouped
    • Counts, share of lines and the log level for each pattern

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    A table of patterns with counts, levels and variable values, a chart, notes and CSV, with a Copy and a Download button on every result.

    • Logs
    • Drain
    • Observability

    Why it matters

    Logs repeat themselves. A busy service writes the same few dozen messages over and over with different IDs, times and numbers, so reading the raw file hides what's actually happening. Grouping lines into templates shows the shape: which messages dominate, which errors recur and which lines appear only once.

    This miner uses Drain, a fixed-depth parse tree that groups lines by their length and first words, then by how many words match. Parts that differ become <*>. Masking first turns numbers, IPs and IDs into placeholders, so lines that only differ in those join the same pattern. It runs in your browser, so production logs stay on your machine.

    How to use it

    1. Paste log lines or choose a log file.
    2. Pick which values to mask and adjust the similarity if needed.
    3. Read the patterns, most common first, and the rare and error ones in the notes.
    4. Export the patterns as CSV.

    FAQ

    What is the Drain algorithm?

    A log parsing method by Pinjia He and others (ICWS 2017) that groups lines with a fixed-depth tree: first by how many words they have, then by their leading words, then by word-by-word similarity. It's fast and is used by tools such as drain3 and logparser.

    What does the similarity setting do?

    A line joins a pattern when at least that share of its words match the pattern's fixed words. The default of 0.4 is drain3's. Raise it to split patterns, lower it to merge them.

    Why mask values first?

    Lines that only differ in numbers or IDs belong together. Masking replaces them with <NUM>, <IP> and so on, so Drain groups them even when the varying value is one of the leading words.

    Are my logs uploaded?

    No. The file is read and mined in your browser.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk