]> scripts.mit.edu Git - wizard.git/commitdiff
Add debugging.
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Thu, 18 Jun 2009 06:15:17 +0000 (02:15 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Thu, 18 Jun 2009 06:15:17 +0000 (02:15 -0400)
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
TODO
lib/wizard/__init__.py

diff --git a/TODO b/TODO
index c467861431b8da12aa8eb139fe1f0f32b17f0bc6..09eb63e0751e57400cee2cdf4cd3972edd5a0ea1 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,11 +2,11 @@ The Git Autoinstaller
 
 TODO NOW:
 
-- For the long running programs, I definitely want to use logging.
 - Whiteboard the flow for performing an upgrade on a single
   install. How assisted does it need to be?
-- Conduct migration tool testing
-- Create mass-migration tool (should be able to limit on mediawiki)
+- Conduct migration tool testing (check andersk, geofft for
+  sample MediaWikis)
+- Set up migration server
 - Run parallel-find.pl
 - Migrate all mediawikis
 - Wordpress needs to have a .scripts/update script written for
index 309b86c700430ec51de9904da4a84152c89a576d..f9fbb9fa6f81d6685769369e109bf55e9a3169d1 100644 (file)
@@ -9,9 +9,9 @@ def makeLogger(options):
     logger.addHandler(stdout)
     if options.verbose:
         logger.verbose = True
-        stdout.setLevel(logging.INFO)
     else:
-        stdout.setLevel(logging.ERROR)
+        if not options.debug: stdout.setLevel(logging.ERROR)
+    if options.debug: logger.setLevel(logging.DEBUG)
     return logger
 
 class UserException(Exception):
@@ -29,6 +29,8 @@ class WizardOptionParser(optparse.OptionParser):
         optparse.OptionParser.__init__(self, *args, **kwargs)
         self.add_option("-v", "--verbose", dest="verbose", action="store_true",
                 default=False, help="Turns on verbose output")
+        self.add_option("--debug", dest="debug", action="store_true",
+                default=False, help="Turns on debugging output")
     def parse_all(self, argv, logger):
         options, numeric_args = self.parse_args(argv)
         return options, numeric_args, logger and logger or makeLogger(options)