2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Increase granularity in build log filename

Extend the build log filename to include seconds and microseconds
to reduce liklihood of name collision.
This commit is contained in:
Andrew Malachowski 2024-08-02 10:17:08 -04:00
parent 91e8dcb5d0
commit e93f468355

View File

@ -9,7 +9,7 @@ A system for recording all outputs to a log file. Just add the following to your
ctx.load('build_logs')
"""
import atexit, sys, time, os, shutil, threading
import atexit, datetime, sys, os, shutil, threading
from waflib import ansiterm, Logs, Context
# adding the logs under the build/ directory will clash with the clean/ command
@ -17,7 +17,7 @@ try:
up = os.path.dirname(Context.g_module.__file__)
except AttributeError:
up = '.'
LOGFILE = os.path.join(up, 'logs', time.strftime('%Y_%m_%d_%H_%M.log'))
LOGFILE = os.path.join(up, 'logs', datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S_%f.log'))
wlock = threading.Lock()
class log_to_file(object):