Raise default logging level to debug if nodaemon is passed

Change-Id: I5a40e3f6d73b4a58df0d6419a360b23e54df3dd4
diff --git a/zuul/ansible/logconfig.py b/zuul/ansible/logconfig.py
index 138ad8b..22d74ca 100644
--- a/zuul/ansible/logconfig.py
+++ b/zuul/ansible/logconfig.py
@@ -219,6 +219,13 @@
             if logger['handlers'] == ['console']:
                 logger['handlers'] = ['normal']
 
+    def setDebug(self):
+        # Change level from INFO to DEBUG
+        for section in ('handlers', 'loggers'):
+            for handler in self._config[section].values():
+                if handler.get('level') == 'INFO':
+                    handler['level'] = 'DEBUG'
+
 
 class FileLoggingConfig(LoggingConfig):
 
diff --git a/zuul/cmd/__init__.py b/zuul/cmd/__init__.py
index 3de9ef5..a5db9a6 100755
--- a/zuul/cmd/__init__.py
+++ b/zuul/cmd/__init__.py
@@ -90,6 +90,7 @@
             # config, leave the config set to emit to stdout.
             if hasattr(self.args, 'nodaemon') and self.args.nodaemon:
                 logging_config = logconfig.ServerLoggingConfig()
+                logging_config.setDebug()
             else:
                 # Setting a server value updates the defaults to use
                 # WatchedFileHandler on /var/log/zuul/{server}-debug.log