Message273049
I just ran into this myself, and would challenge the notion that just because few people complain about the fact that built in compression isn't built in for logging handlers (such as TimedRotatingFileHandler), that it isn't a needed feature. This is such a common feature in pretty much everything that it would be nice to have it built in rather than having a custom RotatingHandler subclass that just compresses the logs and does nothing else in every project I work with.
While not python, i searched github for logback/slf4j (java logging framework) entries for their equivilent of TimedRotatingFileHandler and I found quite a few results:
https://github.com/search?utf8=%E2%9C%93&q=fileNamePattern%2F%3E*.gz+language%3AXML&type=Code&ref=searchresults
you don't even have to change the API of it, it could act the same way as the tarfile module, where if the 'filename' argument ends in one of "bz2", "gz" or 'xz" then it is compressed with that compression type, and if not, then it doesn't compress it (what it does now)
and, that is how logback/slf4j does it as well (http://logback.qos.ch/manual/appenders.html#fwrpFileNamePattern) |
|
Date |
User |
Action |
Args |
2016-08-18 17:33:42 | markgrandi | set | recipients:
+ markgrandi, vinay.sajip, ramhux |
2016-08-18 17:33:42 | markgrandi | set | messageid: <1471541622.31.0.113623237753.issue13516@psf.upfronthosting.co.za> |
2016-08-18 17:33:42 | markgrandi | link | issue13516 messages |
2016-08-18 17:33:41 | markgrandi | create | |
|