summaryrefslogtreecommitdiff
path: root/third_party/waf/waflib/extras/build_logs.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/waf/waflib/extras/build_logs.py')
-rw-r--r--third_party/waf/waflib/extras/build_logs.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/third_party/waf/waflib/extras/build_logs.py b/third_party/waf/waflib/extras/build_logs.py
index 2fb8d346874..87a4e2c3b4a 100644
--- a/third_party/waf/waflib/extras/build_logs.py
+++ b/third_party/waf/waflib/extras/build_logs.py
@@ -1,3 +1,7 @@
+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
+
#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2013 (ita)
@@ -17,7 +21,7 @@ try:
up = os.path.dirname(Context.g_module.__file__)
except AttributeError:
up = '.'
-LOGFILE = os.path.join(up, 'logs', '%s.log' % time.strftime('%Y_%m_%d_%H_%M'))
+LOGFILE = os.path.join(up, 'logs', time.strftime('%Y_%m_%d_%H_%M.log'))
wlock = threading.Lock()
class log_to_file(object):
@@ -96,7 +100,7 @@ def exit_cleanup():
fileobj.close()
filename = sys.stdout.filename
- Logs.info('Output logged to %r' % filename)
+ Logs.info('Output logged to %r', filename)
# then copy the log file to "latest.log" if possible
up = os.path.dirname(os.path.abspath(filename))
@@ -104,7 +108,7 @@ def exit_cleanup():
shutil.copy(filename, os.path.join(up, 'latest.log'))
except OSError:
# this may fail on windows due to processes spawned
- #
pass
atexit.register(exit_cleanup)
+