FS#11272 - Add logrotate script for pacman.log?
Attached to Project:
Pacman
Opened by David Rosenstrauch (darose) - Wednesday, 20 August 2008, 19:51 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 09 September 2009, 11:47 GMT
Opened by David Rosenstrauch (darose) - Wednesday, 20 August 2008, 19:51 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 09 September 2009, 11:47 GMT
|
Details
Perhaps the pacman package should include a logrotate script
for pacman.log?
This was discussed a bit on the Arch general mailing list (see: http://archlinux.org/pipermail/arch-general/2008-August/018324.html) and was a bit of a controversial idea, so perhaps it's not a good idea. Nevertheless, I figured we ought to at least get the idea into a bug report, and capture the resulting discussion of pros/cons - and the final decision - here. |
This task depends upon
Closed by Dan McGee (toofishes)
Wednesday, 09 September 2009, 11:47 GMT
Reason for closing: Won't implement
Additional comments about closing: Please add your own if you want one.
Wednesday, 09 September 2009, 11:47 GMT
Reason for closing: Won't implement
Additional comments about closing: Please add your own if you want one.
1) information about the system like its age
2) retrieving the list of installed packages for restoring a lost local database (it happened more than once)
3) debugging purpose
So *if* a logrotate script is added to pacman, it should be disabled by default, in my opinion.
Any user who really knows what he is doing can then more easily enable it.
And even if it is disabled by default, I would also prefer if this script compressed the old logs rather than deleting them.
It would still save space while keeping all the information (which would be slightly less practical to retrieve, but well).
FWIW, my arch intall on my home server/desktop is about 14 months old, and my pacman.log is less than 600Kb
But I opened this as a bug so we can get a decision written down in the bug tracker, as opposed to the mailing list discussion, which we left hanging with no final resolution.
1) Removes all post-install messages from the log
2) Removes all "synchronizing package lists" / "starting full system upgrade" messages
3) Finds packages that have been uninstalled and removes all traces of them between the respective install/remove lines
4) Perhaps removes all but the last upgrade message for packages the are still installed
5) Removes warnings about pacsave/pacnew files
6) Is configurable to not touch the last n days of the log
7) Can make a list of currently installed according to the log
This would make logs smaller but not remove essential information. So.... who is going to write it for me? :)
http://archlinux.org/pipermail/arch-general/2008-August/018329.html
But then, this would only affect the new logs, not the old ones.