зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1520394 - Restore logging to file after running old-configure. r=nalexander
We're going to want to log some more. At the moment, this just adds the output of subconfigure to top-level config.log, but this will become more useful down the road. Depends on D16665 Differential Revision: https://phabricator.services.mozilla.com/D16666 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b3068819c5
Коммит
dc49c33546
|
@ -322,12 +322,12 @@ def old_configure(prepare_configure, prepare_configure_options):
|
|||
' '.join('%s=%s' % pair for pair in extra_env.iteritems()))
|
||||
|
||||
# Our logging goes to config.log, the same file old.configure uses.
|
||||
# We can't share the handle on the file, so close it. We assume nothing
|
||||
# beyond this point is going to be interesting to log to config.log from
|
||||
# our end, so we don't make the effort to recreate a logging.FileHandler.
|
||||
# We can't share the handle on the file, so close it.
|
||||
logger = logging.getLogger('moz.configure')
|
||||
config_log = None
|
||||
for handler in logger.handlers:
|
||||
if isinstance(handler, logging.FileHandler):
|
||||
config_log = handler
|
||||
handler.close()
|
||||
logger.removeHandler(handler)
|
||||
|
||||
|
@ -351,6 +351,12 @@ def old_configure(prepare_configure, prepare_configure_options):
|
|||
log.error('old-configure failed')
|
||||
sys.exit(ret)
|
||||
|
||||
if config_log:
|
||||
# Create a new handler in append mode
|
||||
handler = logging.FileHandler(config_log.baseFilename, mode='a', delay=True)
|
||||
handler.setFormatter(config_log.formatter)
|
||||
logger.addHandler(handler)
|
||||
|
||||
raw_config = {
|
||||
'split': split,
|
||||
'unique_list': unique_list,
|
||||
|
|
Загрузка…
Ссылка в новой задаче