libera/#maemo/ Thursday, 2024-11-14

joergKotCzarny: indeed it seems the _only_ approach that works16:16
KotCzarnyfun fact, unix/linux started as a 'do one thing, but do it perfect'16:18
KotCzarnyin regard to utils16:18
KotCzarnyso you can use those perfect building blocks to achieve what you need16:18
KotCzarnyif one tool tries to do everything, it will be flawed16:19
joergalternatively the equivalent `for f in /*/*/*/*.log; do [ "$f" < "$(date -d "now - $DAYStoEXPIRE" +"/%Y/%m/%d/$(basename $f)")" ] && ...`16:23
KotCzarnyk.i.s.s.16:24
joergwell, find relies on mtime which _may_ get tampered with16:25
KotCzarnywho would tamper with it?16:25
joergmy alternative aproach uses the explicit dirname timestamps that cronolog created16:25
KotCzarnymtime would only change if the files would be touched or modified16:26
KotCzarnynot just renamed16:26
joergyes16:26
joerglike, when they get compressed ;-D16:26
KotCzarnyi think gzip has an option to preserve timestamp16:26
joerghehehehehe16:27
KotCzarnyeven better, it's default16:27
KotCzarny;)16:27
joergcronolog is a POS16:27
joerglacks half the functionality to make it a comprehensive tool16:28
joergand for unclear reasons it fails to obey the configured "-S symlink2recentLOGfile"16:29
joergapache is user wwwrun but it creates files root:root, nfc what's going on there. I feel like I lost all my *nix fu16:32
KotCzarnyor just b0rken configs16:36
joergwell, /etc/apache2/sites-enabled/wiki.maemo.org_443 has:16:39
joerg ErrorLog "|/usr/bin/cronolog -S /var/log/apache2/mediawiki_https_error /var/log/apache2/%Y/%m/%d/mediawiki_https_error.log"16:39
joerg TransferLog "|/usr/bin/cronolog -S /var/log/apache2/mediawiki_https_transfer /var/log/apache2/%Y/%m/%d/mediawiki_https_access.log"16:39
joergno such thing like a /var/log/apache2/mediawiki_https_error symlink there16:40

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!