I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default? DR
On Thu, Aug 7, 2008 at 3:38 PM, David Rosenstrauch <darose@darose.net> wrote:
I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default?
I don't see a problem with that. Probably a good idea too. If you want to provide a file for pacman, I'm sure Dan would be happy to include it in the arch package.
Aaron Griffin wrote:
On Thu, Aug 7, 2008 at 3:38 PM, David Rosenstrauch <darose@darose.net> wrote:
I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default?
I don't see a problem with that. Probably a good idea too. If you want to provide a file for pacman, I'm sure Dan would be happy to include it in the arch package.
Sure. I'll whip one up. DR
On Thu, 2008-08-07 at 15:42 -0500, Aaron Griffin wrote:
On Thu, Aug 7, 2008 at 3:38 PM, David Rosenstrauch <darose@darose.net> wrote:
I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default?
I don't see a problem with that. Probably a good idea too. If you want to provide a file for pacman, I'm sure Dan would be happy to include it in the arch package.
My only request here is that it saves at least a years worth of updates by default. If something breaks on my system and I don't notice it for a few months, I can't tell if an update broke it or not. I have a 828Kb pacman.log from a 5 year old install. Granted I don't -Syu as often as I should, but it still seems manageable at many times that on modern hardware. Dale
Dale Blount wrote:
My only request here is that it saves at least a years worth of updates by default. If something breaks on my system and I don't notice it for a few months, I can't tell if an update broke it or not.
I have a 828Kb pacman.log from a 5 year old install. Granted I don't -Syu as often as I should, but it still seems manageable at many times that on modern hardware.
Dale
How about this? /var/log/pacman.log { monthly rotate 12 notifempty } DR
On Thu, Aug 7, 2008 at 3:49 PM, Dale Blount <dale@archlinux.org> wrote:
On Thu, 2008-08-07 at 15:42 -0500, Aaron Griffin wrote:
On Thu, Aug 7, 2008 at 3:38 PM, David Rosenstrauch <darose@darose.net> wrote:
I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default?
I don't see a problem with that. Probably a good idea too. If you want to provide a file for pacman, I'm sure Dan would be happy to include it in the arch package.
My only request here is that it saves at least a years worth of updates by default. If something breaks on my system and I don't notice it for a few months, I can't tell if an update broke it or not.
I have a 828Kb pacman.log from a 5 year old install. Granted I don't -Syu as often as I should, but it still seems manageable at many times that on modern hardware.
I'm actually with Dale here. I find it nice to go all the way back to the "beginning of time" with my install so I can see exactly what may have pulled in a now unneeded dep, etc. I just used this on my Eee yesterday to remove unnecessary packages originally pulled in by OpenOffice (hsqldb). I would rather old logs never get deleted; but even more I would rather the file never get touched. There is a separate concern I have wanted to address for a while, and that is the mixing of what was previously a pristine pacman.log with the scriptlet messages. It is a great idea, but in practice, it makes this file not near as concise as it once was. In an ideal world: 1) pacman.log would return to only being upgrade/install/remove messages. 2) another log file would be added that contained the verbose stuff. pacman_messages.log or something. 3) pacman.log never rotates/deletes. 4) pacman_messages.log rotates/deletes. What do people think of this? -Dan
Dan McGee wrote:
I'm actually with Dale here. I find it nice to go all the way back to the "beginning of time" with my install so I can see exactly what may have pulled in a now unneeded dep, etc. I just used this on my Eee yesterday to remove unnecessary packages originally pulled in by OpenOffice (hsqldb). I would rather old logs never get deleted; but even more I would rather the file never get touched.
Well, this certainly isn't an essential change, more just an "in the interests of cleanliness" thing. The pacman.log doesn't get *that* out of hand that this is a necessity. (If it did, we probably would have had a script for this by now.) That said, though, I'd venture to say that you and Dale might be in the minority of users who want to keep everything. Arch changes fast enough that personally I probably have never looked back in the log beyond a month or 2. So in the interests of providing "sane defaults out of the box", it might be a good idea to provide a "sane" rotate script for the average user. (e.g., rotate monthly and keep 3 or 4). Guys like you and Dale would always have the option of changing the rotate script - or even disabling the rotation altogether. I really don't feel that strongly either way about this though. DR
On Thu, Aug 7, 2008 at 4:05 PM, Dan McGee <dpmcgee@gmail.com> wrote:
On Thu, Aug 7, 2008 at 3:49 PM, Dale Blount <dale@archlinux.org> wrote:
On Thu, 2008-08-07 at 15:42 -0500, Aaron Griffin wrote:
On Thu, Aug 7, 2008 at 3:38 PM, David Rosenstrauch <darose@darose.net> wrote:
I noticed that the pacman log doesn't get rotated. Seems like it should, as it could get rather big over time. Any particular reason why the package doesn't provide a /etc/logrotate.d/ script by default?
I don't see a problem with that. Probably a good idea too. If you want to provide a file for pacman, I'm sure Dan would be happy to include it in the arch package.
My only request here is that it saves at least a years worth of updates by default. If something breaks on my system and I don't notice it for a few months, I can't tell if an update broke it or not.
I have a 828Kb pacman.log from a 5 year old install. Granted I don't -Syu as often as I should, but it still seems manageable at many times that on modern hardware.
I'm actually with Dale here. I find it nice to go all the way back to the "beginning of time" with my install so I can see exactly what may have pulled in a now unneeded dep, etc. I just used this on my Eee yesterday to remove unnecessary packages originally pulled in by OpenOffice (hsqldb). I would rather old logs never get deleted; but even more I would rather the file never get touched.
There is a separate concern I have wanted to address for a while, and that is the mixing of what was previously a pristine pacman.log with the scriptlet messages. It is a great idea, but in practice, it makes this file not near as concise as it once was. In an ideal world: 1) pacman.log would return to only being upgrade/install/remove messages. 2) another log file would be added that contained the verbose stuff. pacman_messages.log or something. 3) pacman.log never rotates/deletes. 4) pacman_messages.log rotates/deletes.
What do people think of this?
While we're proposing ideas.... what about this: * new scriptlet function "message()", that just outputs text. * add a -Q operation to call the message() function. Then there's really no need for scriptlet logging at all.
While we're proposing ideas.... what about this: * new scriptlet function "message()", that just outputs text. * add a -Q operation to call the message() function.
Then there's really no need for scriptlet logging at all. The issue that I see with this is that often you can't keep up with the messages during a -Syu. If the messages are not logged, how can I tell which packages have messages? pacman -Q --message every package that was upgraded? Perhaps if pacman.log had something like "The following N packages had messages: foo bar baz [...]. Do pacman -Qm(?) pkgname to see these messages."
I pretty much agree with all of Dan's position on this. Even then I think the current behavior is fine. I think providing a logrotate script might be fine, but rather than having it rotate by time, is there a way that it can rotate by size? For example: when sizeof(pacman.log) >= $N mb; rotate. And never delete the old ones. In any case, if the behavior IS changed, there should definitely be a post_upgrade message and a news item about it. Not everyone follows the mailing lists, and they should still be alerted when previous behavior is changed.
Daenyth Blank wrote:
Even then I think the current behavior is fine. I think providing a logrotate script might be fine, but rather than having it rotate by time, is there a way that it can rotate by size? For example: when sizeof(pacman.log) >= $N mb; rotate.
You can rotate based on size. The rotate script for slim does that.
And never delete the old ones.
Well, it'd be pointless to rotate the logs if the old ones would never get deleted. Keep in mind, by the way, that users would always have the option of *changing* their log rotate script if they wanted the log to never rotate/purge.
In any case, if the behavior IS changed, there should definitely be a post_upgrade message and a news item about it. Not everyone follows the mailing lists, and they should still be alerted when previous behavior is changed.
Definitely agreed. DR
David, On 2008-08-07, David Rosenstrauch wrote:
Well, it'd be pointless to rotate the logs if the old ones would never get deleted.
I think that a combination of the "size" and "copy" options (of logrotate) would allow for one big log file and several size-based snapshots of that file.
Keep in mind, by the way, that users would always have the option of *changing* their log rotate script if they wanted the log to never rotate/purge.
Exactly. Sincerely, -- Antony Jepson / <antonyat@gmail.com> / GPG Key: 0xFA10ED80 ++ Libenter homines id quod volunt credunt. (Men gladly ++ ++ believe that which they wish for.) ++ ++ -- Gaius Iulius Caesar ++
On Donnerstag, 7. August 2008 23:05 Dan McGee wrote:
I'm actually with Dale here. I find it nice to go all the way back to the "beginning of time" with my install so I can see exactly what may have pulled in a now unneeded dep, etc. I just used this on my Eee yesterday to remove unnecessary packages originally pulled in by OpenOffice (hsqldb). I would rather old logs never get deleted; but even more I would rather the file never get touched.
You can archive your old logfiles. This at example be my settings in /etc/logrotate.conf for doing this: olddir /var/log/archiv rotate 2 size +4096k compress You can also use a bigger rotate with a less size. But i think this all is a very much personal thing because some wants uncompressed logs archivs, some wants all in one file and so on.-)
1) pacman.log would return to only being upgrade/install/remove messages. 2) another log file would be added that contained the verbose stuff. pacman_messages.log or something. 3) pacman.log never rotates/deletes. 4) pacman_messages.log rotates/deletes.
Because i use rotate together with compress my favorite is 2). See you, Attila
participants (7)
-
Aaron Griffin
-
Antony Jepson
-
Attila
-
Daenyth Blank
-
Dale Blount
-
Dan McGee
-
David Rosenstrauch