// ZCOLORIZER — REAL-TIME LOG COLORIZER 🎨

zcolorizer v0.2.2 · ccze + pygments port · regex→token engine · 31 cyberpunk themes · 47 format modules · truecolor / 256 / named ANSI

GitHub Issues
// Color scheme

>_ZCOLORIZER

Pipe logs in, get cyberpunk-colored logs out. A Rust port of ccze and the pygments regex→token idea, built on three decoupled pieces: rules tag spans of a line with semantic tokens (date, error, host…), a theme maps each token to a color, and the engine paints the line. Fully customizable rules in TOML, 31 swappable themes, and all 47 format modules (20 classic ccze ports + 27 modern) — cyberpunk by default.

Quickstart

Install from crates.io or source, then pipe any log through it:

# install
cargo install zcolorizer

# from source
git clone https://github.com/MenkeTechnologies/zcolorizer
cd zcolorizer && cargo build --release

# stream logs (line-buffered — tail -f / journalctl -f stay live)
tail -f /var/log/syslog          | zcolorizer -m syslog
journalctl -f                    | zcolorizer --theme synth-wave
zcolorizer access.log            | less -R

# enable a format module (or all of them)
zcolorizer -m httpd access.log
zcolorizer -m all mixed.log      # every module; each only fires on matching lines

With no files it reads stdin. Color auto-disables when piped to a non-terminal — use -C/--force-color to keep it (e.g. into a pager).

How it works

Three things you can change independently — edit one without disturbing the others:

PieceDecidesLives in
Ruleswhich text gets a semantic token (date, error, ip…)regexes — fully editable in the config
Themeswhat each token looks like (color + bold/underline/…)a token→style map you swap live
Engineruns the rules, paints claimed spans with the active themesrc/engine.rs

A rule is a regex whose named capture groups are tokens — one pattern can paint several fields:

(?P<date>\d{4}-\d\d-\d\d)\s+(?P<host>\S+)\s+(?P<error>ERROR)

Because color lives entirely in the theme, switching themes recolors every log without touching a single rule.

Themes (31 + ccze-classic)

The cyberpunk palettes are ported from the shared MenkeTechnologies theme set (iftoprs / storageshower). Default is neon-sprawl (alias cyberpunk). Pick with -t/--theme, list with --list-themes, customize or add your own in the config.

neon-sprawl (default)
acid-rain
synth-wave
blade-runner
red-sector
toxic-waste
night-city
megacorp

…and 23 more: ice-breaker, rust-belt, ghost-wire, sakura-den, data-stream, solar-flare, neon-noir, chrome-heart, void-walker, cyber-frost, plasma-core, steel-nerve, dark-signal, glitch-pop, holo-shift, deep-net, laser-grid, quantum-flux, bio-hazard, darkwave, overlock, zaibatsu, iftopcolor — plus ccze-classic for 16-color parity.

Format modules (ccze plugin ports)

The generic ruleset colors any log out of the box. For known formats, enable a module — a port of the corresponding ccze plugin — to color structured fields precisely. Modules layer on top of the generic rules (they win on overlap, but a free-text message still flows through the generic word-colorizer — exactly ccze's design). Enable with -m/--module (repeatable) or all.

ModuleColorises
syslogGeneric syslog(8): date, host, proc[pid], message
httpdApache/nginx access & error logs
squidsquid access, store and cache logs (TCP_HIT/MISS, hierarchy)
dpkgDebian dpkg status / action / conffile lines
postfixPostfix queue sub-logs (spoolid, field=value)
eximExim MTA: message-id, in/out arrows
procmailprocmail From / Subject / Folder
proftpd · vsftpd · ftpstats · xferlogFTP access / transfer records
phpPHP error log levels
oops · icecast · fetchmailproxy stats · streaming · mail retrieval
apm · distcc · sulog · super · ulogdpower · distributed compile · su · privilege · netfilter

47 modules total — run zcolorizer --list-modules.

Configuration

Copy config.example.toml to ~/.config/zcolorizer/config.toml. Everything is optional — a one-liner is valid. Set the active theme, override individual colors, add your own rules, and enable modules:

theme = "cyberpunk"            # any builtin, or one you define
modules = ["syslog", "httpd"] # or ["all"]
rules_mode = "prepend"        # your rules win over builtins

# override just a few colors of a builtin theme
[[themes]]
name = "cyberpunk"
[themes.styles.error]
fg = "#ff003c"
bold = true
underline = true

# your own rule — named groups ARE tokens; whole-match uses `token`
[[rules]]
name = "uuid"
pattern = '\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b'
token = "address"
ignore_case = true

Color forms: "#ff00aa" (truecolor), "bright_cyan" (named ANSI), { index = 213 } (256-color). Style flags: bold dim italic underline blink reverse.

CLI reference

FlagDescription
-t, --theme NAMEtheme to use (default neon-sprawl, alias cyberpunk)
-m, --module NAMEenable a format module (repeatable; all)
-c, --config PATHconfig file (default ~/.config/zcolorizer/config.toml)
-C, --force-colorcolor even when stdout is not a TTY
    --no-colornever color (passthrough)
    --list-themeslist all themes (active marked with *)
    --list-moduleslist the 47 format modules
    --list-ruleslist effective rules after config merge
    --themes-jsonemit every theme as JSON (for tooling)
    --dump-configprint the resolved config as TOML
-h, --helpcyberpunk house-style help
-V, --versionprint version

Repository & links