In order to fully replace genlop with qlop, one missing option for -f <arg>, --logfile <arg> is reading from compressed log‐files. As my /var/log/emerge.log is part of logration with compression, I need to read all of them for proper statistics. # cat /etc/logrotate.d/emerge /var/log/emerge.log { create 660 portage portage rotate 2 size 2M maxage 220 nodateext compresscmd /bin/bzip2 uncompresscmd /bin/bunzip2 compressext .bz2 } Additionally it would be convenient to support passing multiple files to -f for avoiding that snippet: # type genlop genlop is a function genlop () { local opts args; for args in "$@"; do opts+=("$args"); done; for logfile in /var/log/emerge.log*; do if [[ -r "$logfile" ]]; then opts+=(-f "$logfile"); fi; done; command genlop "${opts[@]}" } Reproducible: Always
Hmm, this makes sense to me. Since we already have compression detection for qxpak, I guess this could be reused. I need to think a bit about how to do the multi-files, there's two ways: 1.) just process one after the other, as if we'd call qlop -f <file> 2.) internally concatenate all files 1. is most simple to implement and has best memory/performance characteristics, but would also be implementable as script (like you currently do). 2. would be able to "see" emerge chains through rotated logs, which makes it more useful, but it will take more resources. I'd personally go for 2. which a bit more work, but sounds like what you're after here.