[Fedora-livecd-list] Updated imgcreate 'logging' handling

James Laska jlaska at redhat.com
Wed Nov 24 16:33:39 UTC 2010


Greetings,

While working with clumens on an anaconda storage testsuite, we were trying to
determine why the livecd-creator --logfile= argument was not being handled as
we expected.  For example, it wasn't capturing command output (e.g. mke2fs) in
the log file, it also wasn't being used elsewhere in imgcreate when emitting
progress (e.g. yuminst.py).  It made for an extremely verbose test output log
which made problem determination difficult.  To address this, I have adjusted
imgcreate to resolve the following issues.  Comments encouraged.

= 0001-Add-a-quiet-option-to-surpress-stdout.-Adjust-handle.patch =

Don't automatically surpress stdout/stderr when adding a --logfile.  Add a
--quiet option to handle stderr/stdout surpression.

= 0002-Work-with-the-logging-settings-when-emitting-progres.patch =

Don't bypass the logging module settings when emitting progress.  Instead, work
with the logging module so that we honor arguments such as: --verbose, --debug
--logfile and --quiet.

= 0003-Wrap-subprocess.call-so-we-can-capture-all-command-o.patch =

Capture output from all subprocess.call() commands and log as debug output.


The only remaining output that isn't routed through logging during a
livecd-creator is the "Installing:" message.  I think this is coming from
yum/rpmtrans.py itself (specifically the SimpleCliCallBack().event() method)
and will need to be handled differently.

  Installing: bc                           ##################### [432/483] 
  Installing: unzip                        ##################### [433/483] 
  Installing: ed                           ##################### [434/483] 
  Installing: nano                         ##################### [435/483] 
  Installing: time                         ##################### [436/483] 
  Installing: telnet                       ##################### [437/483] 
  Installing: talk                         ##################### [438/483] 
  Installing: mtr                          ##################### [439/483] 

Thanks,
James


More information about the livecd mailing list