]> err.no Git - dak/commitdiff
Don't log "dak top-level starting" every time we run "dak ls" or something.
authorChris Lamb <lamby@debian.org>
Thu, 29 Oct 2009 13:21:35 +0000 (13:21 +0000)
committerChris Lamb <lamby@debian.org>
Thu, 29 Oct 2009 13:21:35 +0000 (13:21 +0000)
Signed-off-by: Chris Lamb <lamby@debian.org>
dak/dak.py
daklib/daklog.py

index 448c137f9ca903687e0ab70bf21e53fd039616da..0d92c7d934ed1e01c7f70c9a29bbd707e957842c 100755 (executable)
@@ -156,7 +156,7 @@ Available commands:"""
 def main():
     """Launch dak functionality."""
 
-    logger = Logger(Config(), 'dak top-level')
+    logger = Logger(Config(), 'dak top-level', print_starting=False)
 
     functionality = init()
     modules = [ command for (command, _) in functionality ]
index dfcae368089f0c1d2a0d2e56b9e6e8fa218c6d6a..fb33b0bdab18160525e1c3183d828f1559abba0e 100755 (executable)
@@ -38,7 +38,7 @@ class Logger:
     logfile = None
     program = None
 
-    def __init__ (self, Cnf, program, debug=0):
+    def __init__ (self, Cnf, program, debug=0, print_starting=True):
         "Initialize a new Logger object"
         self.Cnf = Cnf
         self.program = program
@@ -58,7 +58,8 @@ class Logger:
             logfile = utils.open_file(logfilename, 'a')
             os.umask(umask)
         self.logfile = logfile
-        self.log(["program start"])
+        if print_starting:
+            self.log(["program start"])
 
     def log (self, details):
         "Log an event"