2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-26 03:39:53 +01:00

WAF_PRINT_FAILURE_LOG #1930

This commit is contained in:
Thomas Nagy 2017-07-20 19:26:22 +02:00
parent 8fedfef8a3
commit 12fb29e8a5
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

View File

@ -489,9 +489,15 @@ class Context(ctx):
if self.logger:
self.logger.info('from %s: %s' % (self.path.abspath(), msg))
try:
msg = '%s\n(complete log in %s)' % (msg, self.logger.handlers[0].baseFilename)
logfile = self.logger.handlers[0].baseFilename
except AttributeError:
pass
else:
if os.environ.get('WAF_PRINT_FAILURE_LOG'):
# see #1930
msg = 'Log from (%s):\n%s\n' % (logfile, Utils.readf(logfile))
else:
msg = '%s\n(complete log in %s)' % (msg, logfile)
raise self.errors.ConfigurationError(msg, ex=ex)
def to_log(self, msg):