Esempio n. 1
0
 def setup_logging(self, section, parameter):
     if self.config.has_option(section, parameter):
         fp = os.path.expanduser(self.config.get(section, parameter))
         logging_config = logconfig.load_config(fp)
     else:
         # If someone runs in the foreground and doesn't give a logging
         # 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
             # and /var/log/zuul/{server}.log
             logging_config = logconfig.ServerLoggingConfig(server=section)
     logging_config.apply()
Esempio n. 2
0
 def setup_logging(self, section, parameter):
     if self.config.has_option(section, parameter):
         fp = os.path.expanduser(self.config.get(section, parameter))
         logging_config = logconfig.load_config(fp)
     else:
         # If someone runs in the foreground and doesn't give a logging
         # 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
             # and /var/log/zuul/{server}.log
             logging_config = logconfig.ServerLoggingConfig(server=section)
     logging_config.apply()