diff --git a/pypungi/__init__.py b/pypungi/__init__.py index 931c23e6..32fdcd95 100644 --- a/pypungi/__init__.py +++ b/pypungi/__init__.py @@ -48,9 +48,3 @@ class PungiBase(): format='%(name)s.%(levelname)s: %(message)s', filename=logfile) - # Create the stdout/err streams and only send INFO+ stuff there - formatter = logging.Formatter('%(name)s:%(levelname)s: %(message)s') - console = logging.StreamHandler() - console.setFormatter(formatter) - console.setLevel(logging.INFO) - logging.getLogger('').addHandler(console) diff --git a/pypungi/gather.py b/pypungi/gather.py index be1d4790..157b527c 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -53,6 +53,13 @@ class Gather(pypungi.PungiBase): # Set our own logging name space self.logger = logging.getLogger('Pungi.Gather') + # Create the stdout/err streams and only send INFO+ stuff there + formatter = logging.Formatter('%(name)s:%(levelname)s: %(message)s') + console = logging.StreamHandler() + console.setFormatter(formatter) + console.setLevel(logging.INFO) + self.logger.addHandler(console) + self.pkglist = pkglist self.config.cachedir = os.path.join(self.workdir, 'yumcache') self.polist = [] diff --git a/pypungi/pungi.py b/pypungi/pungi.py index 3ffb84c1..f82d0306 100755 --- a/pypungi/pungi.py +++ b/pypungi/pungi.py @@ -28,6 +28,13 @@ class Pungi(pypungi.PungiBase): self.logger = logging.getLogger('Pungi.Pungi') + # Create the stdout/err streams and only send INFO+ stuff there + formatter = logging.Formatter('%(name)s:%(levelname)s: %(message)s') + console = logging.StreamHandler() + console.setFormatter(formatter) + console.setLevel(logging.INFO) + self.logger.addHandler(console) + self.prodpath = 'Fedora' # Probably should be defined elsewhere self.destdir = self.config.get('default', 'destdir') self.archdir = os.path.join(self.destdir,