]> git.ipfire.org Git - pakfire.git/commitdiff
Log Pakfire Builder header only in release mode.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Aug 2011 11:42:22 +0000 (13:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Aug 2011 11:42:22 +0000 (13:42 +0200)
pakfire/builder.py

index 6d03581218c0c8120e2b57ea3587af2052eeb3f7..6e281d2f30838e8fb66bc16d664ddf81e0bc9ad9 100644 (file)
@@ -98,13 +98,17 @@ class Builder(object):
                        # If no logile was given, we use the root logger.
                        self.log = logging.getLogger()
 
-               logdata = {
-                       "host"    : socket.gethostname(),
-                       "time"    : time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()),
-                       "version" : "Pakfire %s" % PAKFIRE_VERSION,
-               }
-               for line in BUILD_LOG_HEADER.splitlines():
-                       self.log.info(line % logdata)
+               # Log information about pakfire and some more information, when we
+               # are running in release mode.
+               if self.mode == "release":
+                       logdata = {
+                               "host"    : socket.gethostname(),
+                               "time"    : time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()),
+                               "version" : "Pakfire %s" % PAKFIRE_VERSION,
+                       }
+
+                       for line in BUILD_LOG_HEADER.splitlines():
+                               self.log.info(line % logdata)
 
                # Create pakfire instance.
                if pakfire_args.has_key("mode"):