A Windows log colorizer inspired by ccze. Reads log data from stdin or a file, applies regex-based color rules, and outputs colorized text to the terminal or as HTML.
- ANSI & Windows Console color auto-detection (VTP or
SetConsoleTextAttributefallback) - HTML output mode with inline CSS or external stylesheet
- PCRE2 regex rules loaded from a config file
- Tool rules that pipe matched text through external commands (e.g.
jq .) - Word coloring of common keywords (ERROR, WARN, INFO, etc.) in unmatched text
- Built-in syslog parser matching ccze's color scheme
- Syslog facility stripping (
-r) - Single static binary — no DLL dependencies
ccze.exe [OPTIONS] [FILE]
Pipe a log file:
type (or cat, w/e) myapp.log | cczeRead from a file:
ccze myapp.logOutput as HTML:
ccze -h myapp.log > output.html| Flag | Description |
|---|---|
-A, --raw-ansi |
Force ANSI escape code output |
-h, --html |
Output colorized HTML |
-m, --mode MODE |
Output mode: ansi, html, none (default: auto) |
-F, --rcfile FILE |
Use FILE as config instead of ccze.conf |
-c, --color KEY=COL |
Override a color from the command line |
-r, --remove-facility |
Strip syslog facility/level prefix |
-l, --list-rules |
List loaded rules and exit |
-o, --options OPT |
Toggle: wordcolor/nowordcolor, transparent/notransparent, cssfile=FILE |
--no-color |
Disable all color output |
-V, --version |
Print version and exit |
--help |
Show help |
Rules are loaded from ccze.conf (next to ccze.exe, or specified with -F).
# Lines starting with # are comments
# Color rules: color COLOR_NAME PCRE2_REGEX
color BRIGHT_RED \bERROR\b
color GREEN \bINFO\b
color YELLOW \bWARN(ING)?\b
# Tool rules: pipe matched text through a command
tool jq . \{[\s\S]*?\}
Available colors: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, and BRIGHT_ variants of each.
Rules are processed in order. First match wins per character position.
Requires:
- Visual Studio 2022 (MSVC)
- vcpkg with
pcre2:x64-windows-static
vcpkg install pcre2:x64-windows-static
build.batProduces a single ccze.exe with PCRE2 statically linked.
- CBS.log (Servicing)
- dism.log (Deployment)
- setupapi.dev.log (Driver installation - uses >>> and <<<)
- setupapi.setup.log (App/OS setup)
- WindowsUpdate.log (Update traces)
- pfirewall.log (Windows Firewall traffic)
- SrtTrail.txt (Startup Repair results)
- PFRO.log (Pending File Rename Operations)
- setuperr.log (OS Installation errors)
- setupact.log (OS Installation actions)
- MSI*.log (Windows Installer logs)
- DirectX.log (DirectX setup)
- DPX.log (Data Package Expander)
- ReportingEvents.log (Update reporting)
- WinSetup.log (Modern Setup logs)
- MoSetup.log (Media Creation Tool / Upgrade)
- Diagerr/Diagwrn (System Diagnostics)
- VSS logs (Volume Shadow Copy)
- WlanMgr.log (Wireless networking)
- Shell.log (Explorer/Shell events)
If you want something added, file an issue at https://github.com/scramblr/ccze-win
All the same ones as it always has supported: syslog, nginx, apache logs, etc.
Again, If you want something added, file an issue at https://github.com/scramblr/ccze-win
PolyForm Noncommercial 1.0.0 — free for personal/non-commercial use. See LICENSE.md for details.