How cristianism0/cassandra works
Cassandra is a Linux log-reading CLI: users choose a source and options, then receive filtered and formatted log records. The map covers source discovery, text and binary log parsing, systemd journal access, shared record types, time handling, and display modes. README documents filtering and output capabilities; the sampled excerpts do not show the CLI’s internal orchestration, so those links are limited to documented responsibilities and evident module boundaries.
Main entry points: models.rs Entry types · cli.rs CLI workflow · selector.rs Parser dispatch · sys.rs Syslog parser
Components 20
CLI entry
- Program entry
src/main.rs - CLI workflow
src/cli.rs
Log sources
- Path discovery
src/utils/discovery.rs - Parser dispatch
src/parsers/selector.rs - Syslog parser
src/parsers/sys.rs - Auth parser
src/parsers/auth.rs - Wtmp parser
src/parsers/wtmp.rs - Journal parser
src/parsers/journal.rs
Records and filters
- Entry types
src/models.rs - Sys records
src/models/sys.rs - Auth records
src/models/auth.rs - Journal records
src/models/journal.rs - Wtmp records
src/models/wtmp.rs - Time parsing
src/utils/time.rs
Output
- Table rendering
src/display/table_cli.rs - Pager output
src/display/pager.rs - Display modes
src/display.rs
Other components
- User
- Log files
- systemd journal
Connections 26
- User → Program entry: runs
- Program entry → CLI workflow: starts CLI
- CLI workflow → Path discovery: finds sources
- Path discovery → Log files: checks paths
- CLI workflow → Parser dispatch: selects parser
- Parser dispatch → Syslog parser: dispatches
- Parser dispatch → Auth parser: dispatches
- Parser dispatch → Wtmp parser: dispatches
- Parser dispatch → Journal parser: dispatches
- Syslog parser → Log files: reads
- Auth parser → Log files: reads
- Wtmp parser → Log files: reads
- Journal parser → systemd journal: reads entries
- Syslog parser → Entry types: creates entries
- Auth parser → Entry types: creates entries
- Wtmp parser → Entry types: creates entries
- Journal parser → Entry types: creates entries
- Entry types → Sys records: includes
- Entry types → Auth records: includes
- Entry types → Journal records: includes
- Entry types → Wtmp records: includes
- CLI workflow → Time parsing: parses time filters
- CLI workflow → Table rendering: renders entries
- CLI workflow → Display modes: selects mode
- Display modes → Table rendering: formats output
- CLI workflow → Pager output: pages output