From: Michael Tremer Date: Sun, 20 Nov 2011 10:40:21 +0000 (+0100) Subject: Update more files with new logger. X-Git-Tag: 0.9.18~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3eca2587d2b247f00359f6f284d783af0cd63c36;p=pakfire.git Update more files with new logger. --- diff --git a/po/pakfire.pot b/po/pakfire.pot index c077ed507..d96c8a907 100644 --- a/po/pakfire.pot +++ b/po/pakfire.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-20 10:47+0100\n" +"POT-Creation-Date: 2011-11-20 11:27+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -111,37 +111,43 @@ msgstr "" msgid "Everything is fine." msgstr "" -#: ../python/pakfire/builder.py:124 +#. Log the package information. +#: ../python/pakfire/builder.py:139 msgid "Package information:" msgstr "" #. Copy the makefile and load source tarballs. -#: ../python/pakfire/builder.py:289 +#: ../python/pakfire/builder.py:304 msgid "Extracting" msgstr "" -#: ../python/pakfire/builder.py:549 +#: ../python/pakfire/builder.py:554 +#, python-format +msgid "Could not find makefile in build root: %s" +msgstr "" + +#: ../python/pakfire/builder.py:567 msgid "The build command failed. See logfile for details." msgstr "" #. Package the result. #. Make all these little package from the build environment. -#: ../python/pakfire/builder.py:696 +#: ../python/pakfire/builder.py:714 msgid "Creating packages:" msgstr "" #. Execute the buildscript of this stage. -#: ../python/pakfire/builder.py:716 +#: ../python/pakfire/builder.py:734 #, python-format msgid "Running stage %s:" msgstr "" -#: ../python/pakfire/builder.py:734 +#: ../python/pakfire/builder.py:752 #, python-format msgid "Could not remove static libraries: %s" msgstr "" -#: ../python/pakfire/builder.py:740 +#: ../python/pakfire/builder.py:758 msgid "Compressing man pages did not complete successfully." msgstr "" @@ -579,11 +585,11 @@ msgstr "" msgid "Could not remove file: /%s" msgstr "" -#: ../python/pakfire/packages/make.py:77 +#: ../python/pakfire/packages/make.py:78 msgid "Package name is undefined." msgstr "" -#: ../python/pakfire/packages/make.py:80 +#: ../python/pakfire/packages/make.py:81 msgid "Package version is undefined." msgstr "" @@ -947,28 +953,28 @@ msgid "allow replacement of %s with %s" msgstr "" #. XXX Maybe we can make a more beautiful message here?! -#: ../scripts/pakfire-multicall.py:23 +#: ../scripts/pakfire-multicall.py:25 msgid "" "There has been an error when trying to import one or more of the modules, " "that are required to run Pakfire." msgstr "" -#: ../scripts/pakfire-multicall.py:25 +#: ../scripts/pakfire-multicall.py:27 msgid "Please check your installation of Pakfire." msgstr "" -#: ../scripts/pakfire-multicall.py:27 +#: ../scripts/pakfire-multicall.py:29 msgid "The error that lead to this:" msgstr "" -#: ../scripts/pakfire-multicall.py:65 +#: ../scripts/pakfire-multicall.py:67 msgid "An error has occured when running Pakfire." msgstr "" -#: ../scripts/pakfire-multicall.py:68 +#: ../scripts/pakfire-multicall.py:70 msgid "Error message:" msgstr "" -#: ../scripts/pakfire-multicall.py:72 +#: ../scripts/pakfire-multicall.py:74 msgid "Further description:" msgstr "" diff --git a/python/pakfire/config.py b/python/pakfire/config.py index fa89cfb99..1c9e13be4 100644 --- a/python/pakfire/config.py +++ b/python/pakfire/config.py @@ -19,11 +19,13 @@ # # ############################################################################### -import logging import os from ConfigParser import ConfigParser +import logging +log = logging.getLogger("pakfire") + import base from constants import * @@ -50,13 +52,13 @@ class Config(object): self.read(file) def dump(self): - logging.debug("Configuration:") + log.debug("Configuration:") for k, v in self._config.items(): - logging.debug(" %s : %s" % (k, v)) + log.debug(" %s : %s" % (k, v)) - logging.debug("Loaded from files:") + log.debug("Loaded from files:") for f in self._files: - logging.debug(" %s" % f) + log.debug(" %s" % f) def read(self, filename): # If filename does not exist we return silently @@ -69,7 +71,7 @@ class Config(object): if filename in self._files: return - logging.debug("Reading configuration file: %s" % filename) + log.debug("Reading configuration file: %s" % filename) config = ConfigParser() config.read(filename) @@ -115,7 +117,7 @@ class Config(object): return self._config.get(key, default) def set(self, key, val): - logging.debug("Updating configuration parameter: %s = %s" % (key, val)) + log.debug("Updating configuration parameter: %s = %s" % (key, val)) self._config[key] = val def update(self, values): diff --git a/scripts/pakfire-multicall.py b/scripts/pakfire-multicall.py index b9acc4bbe..864873e77 100755 --- a/scripts/pakfire-multicall.py +++ b/scripts/pakfire-multicall.py @@ -1,9 +1,11 @@ #!/usr/bin/python -import logging import os import sys +import logging +log = logging.getLogger("pakfire") + try: from pakfire.cli import * from pakfire.i18n import _ @@ -56,22 +58,22 @@ try: cli.run() except KeyboardInterrupt: - logging.critical("Recieved keyboard interupt (Ctrl-C). Exiting.") + log.critical("Recieved keyboard interupt (Ctrl-C). Exiting.") ret = 1 # Catch all errors and show a user-friendly error message. except Error, e: - logging.critical("") - logging.critical(_("An error has occured when running Pakfire.")) - logging.error("") + log.critical("") + log.critical(_("An error has occured when running Pakfire.")) + log.error("") - logging.error(_("Error message:")) - logging.error(" %s: %s" % (e.__class__.__name__, e.message)) - logging.error("") + log.error(_("Error message:")) + log.error(" %s: %s" % (e.__class__.__name__, e.message)) + log.error("") - logging.error(_("Further description:")) - logging.error(" %s" % e) - logging.error("") + log.error(_("Further description:")) + log.error(" %s" % e) + log.error("") ret = e.exit_code