Message148732
| Author |
ramhux |
| Recipients |
ramhux, vinay.sajip |
| Date |
2011年12月01日.18:00:20 |
| SpamBayes Score |
9.2023336e-05 |
| Marked as misclassified |
No |
| Message-id |
<1322762423.02.0.0799773449724.issue13516@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Sometimes log files grow very quickly and consume too much disk space (e.g. DEBUG), so compress old log files saves disk space without losing the information from log files.
I propose to add a "gzip" or "compress" argument to RotatingFileHandler and TimedRotatingFileHandler to select the number of old files you want to compress.
For example, if you set the argument to 0 (default) no files are gzipped , but if you set it to 3 you get the following log files:
app.log
app.log.1
app.log.2
app.log.3.gz
app.log.4.gz
...
app.log.n.gz
For TimedRotatingFileHandler it works similar, gzipping from the n-th newer log file to the oldest log file:
app.log
app.log.2011年12月01日
app.log.2011年11月30日
app.log.2011年11月29日.gz
app.log.2011年11月28日.gz
...
A possible patch is attached |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年12月01日 18:00:23 | ramhux | set | recipients:
+ ramhux, vinay.sajip |
| 2011年12月01日 18:00:23 | ramhux | set | messageid: <1322762423.02.0.0799773449724.issue13516@psf.upfronthosting.co.za> |
| 2011年12月01日 18:00:22 | ramhux | link | issue13516 messages |
| 2011年12月01日 18:00:22 | ramhux | create |
|