File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 31
31
import re
32
32
import sys
33
33
import textwrap
34
+ from time import time
34
35
from typing import List , Optional , Union
35
36
36
37
from ansimarkup import parse as cparse , strip as cstrip
@@ -238,15 +239,22 @@ def do_rollover(self) -> None:
238
239
os .dup2 (self .stream .fileno (), sys .stderr .fileno ())
239
240
# Emit header records (should only do this for subsequent log files)
240
241
for header_record in self .header_records :
242
+ now = time ()
241
243
if self .ROLLOVER_NUM in header_record .__dict__ :
242
244
# A hack to increment the rollover number that gets logged in
243
245
# the log file. (Rollover number only applies to a particular
244
246
# workflow run; note this is different from the log count
245
247
# number in the log filename.)
248
+
246
249
header_record .__dict__ [self .ROLLOVER_NUM ] += 1
247
250
header_record .args = (
248
251
header_record .__dict__ [self .ROLLOVER_NUM ],
249
252
)
253
+
254
+ # patch the record time (otherwise this will be logged with the
255
+ # original timestamp)
256
+ header_record .created = now
257
+
250
258
logging .FileHandler .emit (self , header_record )
251
259
252
260
def update_log_archive (self , arch_len : int ) -> None :
You can’t perform that action at this time.
0 commit comments