[pacman-dev] scritplet output logging removed?
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use" Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
2007/10/18, Xavier <shiningxc@gmail.com>:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
AFAIR that was an attempt of unification post_install messages, but it was not used so it was removed until better times. -- Roman Kyrylych (Роман Кирилич)
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in. HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections? -Dan
On Thu, 18 Oct 2007 08:41:07 -0500, Dan McGee wrote
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
+1 - another log file is cool by me. -- Travis
2007/10/18, Travis Willard <travis@archlinux.org>:
On Thu, 18 Oct 2007 08:41:07 -0500, Dan McGee wrote
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
ah, I was wrong.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
+1 - another log file is cool by me.
+1. This will make finding post_install messages easier. -- Roman Kyrylych (Роман Кирилич)
On 10/18/07, Dan McGee <dpmcgee@gmail.com> wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
Yes, great idea. What about putting it in the local DB entry for each package? /var/lib/pacman/local/screen/install.log ?
On 10/18/07, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 10/18/07, Dan McGee <dpmcgee@gmail.com> wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
Yes, great idea.
What about putting it in the local DB entry for each package? /var/lib/pacman/local/screen/install.log ?
We still need an "easy to find" way of looking at these messages, and I don't think putting it there would satisfy that constraint (although it does make sense). Telling someone to look at more than one file wouldn't be too simple. -Dan
On Thu, 18 Oct 2007 10:36:37 -0500, Aaron Griffin wrote
What about putting it in the local DB entry for each package? /var/lib/pacman/local/screen/install.log ?
-1 While that associates it nicely with its related package, I don't really like the idea of users needing to traipse through their local DB to get the logs - what if at some point in the future we decide to change DB formats, say from filesystem to database, for example? IMO /var/log is the place for logs like this. If you want to separate it by package, then /var/log/pacman/{pkgname}/install.log could work, or some variant thereof, or we could just jam it all into one file and have delineations, like --------- Installed libfoo, 01/01/1901 ------------ ==> Warning: Libfoo needs libbar to support foobar functionality. ==> pacman -S libbar to get it. --------- Installed kernel26, /01/01/1901 ---------- ==> Generating mkinitcpio crap... blah blah blah ==> Done. And so on. -- Travis
On 10/18/07, Travis Willard <travis@archlinux.org> wrote:
On Thu, 18 Oct 2007 10:36:37 -0500, Aaron Griffin wrote
What about putting it in the local DB entry for each package? /var/lib/pacman/local/screen/install.log ?
-1
While that associates it nicely with its related package, I don't really like the idea of users needing to traipse through their local DB to get the logs - what if at some point in the future we decide to change DB formats, say from filesystem to database, for example?
IMO /var/log is the place for logs like this. If you want to separate it by package, then /var/log/pacman/{pkgname}/install.log could work, or some variant thereof, or we could just jam it all into one file and have delineations, like
--------- Installed libfoo, 01/01/1901 ------------ ==> Warning: Libfoo needs libbar to support foobar functionality. ==> pacman -S libbar to get it. --------- Installed kernel26, /01/01/1901 ---------- ==> Generating mkinitcpio crap... blah blah blah ==> Done.
And so on.
Yeah /var/log is a much better place - moreover I was trying to suggest the "one log file per package" but I don't know how good of an idea that is. I actually kinda like Travis' format above with the delimiter there.
On Thu, Oct 18, 2007 at 08:41:07AM -0500, Dan McGee wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
I only saw today that the scriptlet logging wasn't always safe, and that removing it actually fixed a bug : http://bugs.archlinux.org/task/7117#comment18667 I thought this was worth mentionning, because if this scriptlet logging was ever reimplemented, it should probably deal with the %s issue.
On 11/4/07, Xavier <shiningxc@gmail.com> wrote:
On Thu, Oct 18, 2007 at 08:41:07AM -0500, Dan McGee wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
I only saw today that the scriptlet logging wasn't always safe, and that removing it actually fixed a bug : http://bugs.archlinux.org/task/7117#comment18667
I thought this was worth mentionning, because if this scriptlet logging was ever reimplemented, it should probably deal with the %s issue.
Yeah, Jeff was working on this - I explicitly asked him to use puts() for scriptlet lines, and NOT printf(). Though, now that I think of it, we should do the same with _alpm_logaction (using fputs())
On Nov 5, 2007 1:18 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 11/4/07, Xavier <shiningxc@gmail.com> wrote:
On Thu, Oct 18, 2007 at 08:41:07AM -0500, Dan McGee wrote:
On 10/18/07, Xavier <shiningxc@gmail.com> wrote:
I just saw this was removed by commit ad691001e : "Remove scriptlet START and DONE commands that we don't use"
Since the comment doesn't mention the logging, I just want to make sure this was intended and not overlooked.
Hmm, another good catch. It looks like I did remove the logging unintentionally. I guess we need to incorporate that back in.
HOWEVER, I'd like to hear opinions on this. I always thought it was a dirty hack to throw this stuff to pacman.log, which previously was a very clean and machine-parseable log file. Its now a big steaming pile of crap, in my opinion. I propose that we log these messages to a separate file, with some date stamps incorporated. Any objections?
I only saw today that the scriptlet logging wasn't always safe, and that removing it actually fixed a bug : http://bugs.archlinux.org/task/7117#comment18667
I thought this was worth mentionning, because if this scriptlet logging was ever reimplemented, it should probably deal with the %s issue.
Yeah, Jeff was working on this - I explicitly asked him to use puts() for scriptlet lines, and NOT printf(). Though, now that I think of it, we should do the same with _alpm_logaction (using fputs())
I already fixed the lack of logging in GIT, although it is just doing what it used to do for now, which is not what I want it to do in the future (log to pacman.log). And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know. -Dan
On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know.
Yeah, that works too - f/puts() is just a little cheaper of a call, but that's me being snarky. I tend to use "++i" because it has the potential to be equal to "i++" or _one_ clock cycle faster 8)
On Nov 5, 2007 10:40 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know.
Yeah, that works too - f/puts() is just a little cheaper of a call, but that's me being snarky. I tend to use "++i" because it has the potential to be equal to "i++" or _one_ clock cycle faster 8)
I would guess GCC is able to optimize calls to printf("%s") quite well, in addition to figuring out i++ vs. ++i (especially when there are 0 side effects from interchanging them). But that is just a guess. :) -Dan
On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
On Nov 5, 2007 10:40 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On 11/5/07, Dan McGee <dpmcgee@gmail.com> wrote:
And there is no need to use puts/fputs if you just use a format string correctly: printf("%s", stringtoprint) instead of printf(stringtoprint), as far as I know.
Yeah, that works too - f/puts() is just a little cheaper of a call, but that's me being snarky. I tend to use "++i" because it has the potential to be equal to "i++" or _one_ clock cycle faster 8)
I would guess GCC is able to optimize calls to printf("%s") quite well, in addition to figuring out i++ vs. ++i (especially when there are 0 side effects from interchanging them). But that is just a guess. :)
Zero side effects if-and-only-if there is no assignment as part of that expression 8)
participants (5)
-
Aaron Griffin
-
Dan McGee
-
Roman Kyrylych
-
Travis Willard
-
Xavier