On Wed, Mar 07, 2012 at 12:31:48AM -0500, Lawrence Teo wrote:
> This simple diff makes pkg_add and pkg_delete include their PID when
> logging to syslog. This is useful when trying to determine whether
> several packages were added (or removed) by the same pkg_add (or
> pkg_delete) process.
> Here is some sample output:
> Mar  3 22:15:17 obsd-amd64 pkg_add[3530]: Added nano-2.2.6 
> Mar  3 22:15:26 obsd-amd64 pkg_delete[21136]: Removed nano-2.2.6 
> Mar  3 22:16:51 obsd-amd64 pkg_add[30666]: Added redland-1.0.8p1 
> Mar  3 22:16:54 obsd-amd64 pkg_add[30666]: Added mozilla-dicts-en-GB-1.3 
> Mar  3 22:16:56 obsd-amd64 pkg_add[30666]: Added hunspell-1.2.12 
> Mar  3 22:23:22 obsd-amd64 pkg_add[30666]: Added libreoffice- 
> Mar  3 23:33:23 obsd-amd64 pkg_add[5948]: Added kdiff3-0.9.96p1 
> Comments?

The more I think about it, the more I fail to see the value.
Consider that any pkg_add/pkg_delete that actually changes installed
packages *will* lock the database anyways, so by nature, all relevant
runs of pkg_add/pkg_delete will happen in sequence.

Hence, there's totally no ambiguity in the log lines. If I remove the pids
in there, I still have no trouble figuring out what happened.

When I look at those logs, I usually have to look at the time anyways,
so in the above case, figuring out that libreoffice and kdiff3 are
different runs of pkg_add is not that hard...

I won't say I can't be swayed, but you'll have to give me a concrete case
where the pid offers some actual advantage over no pid.

Reply via email to