[Ovirt-devel] [PATCH] Redirecting all logs to /var/log/ovirt.log

Chris Lalancette clalance at redhat.com
Mon Jul 14 18:57:38 UTC 2008


Darryl L. Pierce wrote:
> Given how short our scripts are, I don't see a benefit to inserting a 
> method in between the entry point and the functionality.  However,I do 
> like the failure notice as opposed to just exiting the script. So I've 
> pulled that into the script and replaced all calls to die "message" with:
> 
> function start () {
> 	wget -q -o "some url" || echo "message" && return 1
> }
> 
> I'll have a patch out shortly once I run through tests.

I think what Perry is trying to get at is that it would be nice to both display
an [ OK ] or [ FAIL ] message at the console (like all of the other init scripts
do), but to also put more verbose output into a logging directory for debugging.
   That way, if you see you have a [ FAIL ], you at least have an opportunity to
debug it.  The other advantage is that you don't have redirects littered
throughout the code for each individual line, and new code (if and when we need
it) automatically get logged to the appropriate place.

Oh, one other nit-pick from me; I would name the log something like
/var/log/ovirt-init.log, to make entirely clear it is the output from the init
scripts.

Chris Lalancette




More information about the ovirt-devel mailing list