[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/3]: Log argv passed to virExec and virRun



On Thu, Oct 30, 2008 at 02:06:20PM -0400, Cole Robinson wrote:
> The attached patch logs the the argv's passed to
> the virExec and virRun functions. There's a bit of
> trickery here: since virRun is just a wrapper for
> virExec, we don't want the argv string to be logged
> twice. 
> 
> I addressed this by renaming virExec to __virExec,
> and keeping the original function name to simply
> debug the argv and then hand off control. This
> means anytime virExec is explictly called, the
> argv will be logged, but if functions wish to by
> pass that they can just call __virExec (which is
> what virRun does.)

I'm a little confused about why we can't just put the logging
calling directly in the existing virExec() function. Since the
first thing virRun() does is to call virExec() this would 
seem to be sufficient without need of a wrapper.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]