pacman-log
A Rust library for parsing and querying pacman logs.
Usage
use ;
// Read system log
let entries: = system
.filter_action
.into_iter
.?;
// Reverse reading (most recent first)
let recent: = open
.reverse
.into_iter
.take
.?;
// Filter by package
let linux_history: = system
.filter_package
.into_iter
.?;
The iterator above yields package operations only. To see every line type
(pacman commands, transaction markers, hook and scriptlet output) use entries,
or group operations into commits with transactions:
use ;
// Each transaction is tagged with the pacman command that triggered it
for txn in system.transactions.filter_map
// Most-run commands
let counts = command_counts;
License
GPL-3.0