Command-Line Interface¶
The bugdna-cli module analyzes BUGDNA-* fingerprint IDs already present in text log
files produced by Java, Node.js / TypeScript, or Python applications. It
does not parse raw stack traces or generate new fingerprints from raw exception text.
Build¶
Build the executable JAR:
The result is:
Run it directly:
Repository launcher scripts are also provided:
Windows:
Add the repository bin directory to PATH to use the short command:
Analyze a Log File¶
Given a log file containing repeated IDs:
2026-06-12 ERROR [BUGDNA-001] Payment failed
2026-06-12 ERROR [BUGDNA-002] Customer lookup failed
2026-06-12 ERROR [BUGDNA-001] Payment failed
Run:
Output:
Results are sorted by occurrence count descending, then fingerprint ID for deterministic ties.
Compare Log Files¶
Compare an older log with a newer log:
Output:
New fingerprints counts IDs found only in the newer log. Resolved fingerprints
counts IDs found only in the older log. Recurring fingerprints counts IDs present
in both logs. Occurrence-count changes do not alter these classifications.
Include deployment versions:
Version 1.2.0 -> Version 1.3.0
New fingerprints: 4
Resolved fingerprints: 12
Recurring fingerprints: 8
Matching Rules¶
The analyzer:
- Reads the file as UTF-8
- Finds every
BUGDNA-*hexadecimal token - Matches IDs case-insensitively and prints uppercase IDs
- Counts multiple fingerprint occurrences on the same line
- Ignores lines without a BugDNA ID
An empty log or a log without fingerprint IDs returns:
Exit Codes¶
| Code | Meaning |
|---|---|
0 |
Analysis completed |
2 |
Invalid command or arguments |
3 |
Invalid or unreadable log file |
Invalid usage prints: