1
0
mirror of https://github.com/ciromattia/kcc synced 2026-07-11 07:23:21 +00:00

millisecond timestamp kindlegen log (#1393)

This commit is contained in:
Alex Xu
2026-07-10 17:47:34 -07:00
committed by GitHub
parent 2a5cd6718d
commit 4c10569ab1
+2 -2
View File
@@ -2030,8 +2030,8 @@ def makeMOBIWorker(item):
kindlegenErrorCode = 1
kindlegenError = '\n\n'.join(warnings + [line, 'kindlegen logs dumped'])
try:
timestamp = datetime.now().isoformat(timespec='seconds').replace(':', '_')
with open(os.path.join(os.path.dirname(item), f'kindlegen_log_{timestamp}.txt'), 'w') as f:
timestamp = datetime.now().isoformat(timespec='milliseconds').replace(':', '-').replace('.', '-')
with open(os.path.join(os.path.dirname(item), f'kindlegen-log-{timestamp}.txt'), 'w') as f:
f.write(err.stdout)
except Exception as e:
print(e)