Change log_file_name to add _date for sct driver logfiles
This commit is contained in:
@ -1086,9 +1086,12 @@ def put_preamble(MyDriver):
|
||||
txt += [' set catch_status [ catch {']
|
||||
txt += [' set debug_threshold [hgetpropval ${tc_root} debug_threshold]']
|
||||
txt += [' if {${debug_level} >= ${debug_threshold}} {']
|
||||
txt += [' set fd [open "../log/%s_[basename ${tc_root}].log" "a"]' % MyDriver['name']]
|
||||
txt += [' set line "[clock format [clock seconds] -format "%T"] ${debug_string}"']
|
||||
txt += [' puts ${fd} "${line}"']
|
||||
txt += [' set now [clock seconds]']
|
||||
txt += [' set ts [clock format ${now} -format "%Y%m%d"]']
|
||||
txt += [' set log_file_name "../log/%s_[basename ${tc_root}]_${ts}.log"' % MyDriver['name']]
|
||||
txt += [' set fd [open "${log_file_name}" "a"]']
|
||||
txt += [' set ts [clock format ${now} -format "%T"]']
|
||||
txt += [' puts ${fd} "${ts} ${debug_string}"']
|
||||
txt += [' close ${fd}']
|
||||
txt += [' }']
|
||||
txt += [' } catch_message ]']
|
||||
|
Reference in New Issue
Block a user