Minor update, package operations are now logged in main anaconda.log file.
Signed-off-by: Karel Valek kvalek@redhat.com
From: Karel Valek kvalek@redhat.com
Minor update, package operations are now logged in main anaconda.log file.
Signed-off-by: Karel Valek kvalek@redhat.com --- pyanaconda/packaging/dnfpayload.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py index 818eac4..1d6d1f8 100644 --- a/pyanaconda/packaging/dnfpayload.py +++ b/pyanaconda/packaging/dnfpayload.py @@ -46,6 +46,7 @@ from pyanaconda.iutil import open # pylint: disable=redefined-builtin
log = logging.getLogger("packaging") +log_ana = logging.getLogger("anaconda")
import dnf import dnf.exceptions @@ -612,6 +613,7 @@ def gatherRepoMetadata(self):
def install(self): progressQ.send_message(_('Starting package installation process')) + log_ana.info('Starting package installation process')
# Add the rpm macros to the global transaction environment for macro in self.rpmMacros: @@ -628,6 +630,7 @@ def install(self):
pkgs_to_download = self._base.transaction.install_set log.info('Downloading packages.') + log_ana.info('Downloading packages.') progressQ.send_message(_('Downloading packages')) progress = DownloadProgress() try: @@ -641,6 +644,7 @@ def install(self): log.info('Downloading packages finished.')
pre_msg = _("Preparing transaction from installation source") + log_ana.info("Preparing transaction from installation source") progressQ.send_message(pre_msg)
queue_instance = multiprocessing.Queue() @@ -658,6 +662,7 @@ def install(self): _failure_limbo()
post_msg = _("Performing post-installation setup tasks") + log_ana.info("Performing post-installation setup tasks") progressQ.send_message(post_msg) process.join() self._base.close()
Looks good to me
Added label: ACK.
Added label: NACK.
Removed label: ACK.
Added label: ACK.
Removed label: NACK.
Removed label: ACK.
Ooops, sorry for the "label" noise. I think the logging should be done in the progress messages processing (i.e. in one place) and not after every single ``send_message()`` call.
Take a look in progress.py, we already have a helper function, progress_message(), to send the message and log it :)
anaconda-patches@lists.fedorahosted.org