Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203513
Change subject: Use isoformat in datetime logs, rather than asctime
......................................................................
Use isoformat in datetime logs, rather than asctime
Change-Id: Ic11a70e28288517b6f174d7066f71a12efd5f4f1
---
M tools/manifest/tool.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/software/tools-manifest
refs/changes/13/203513/1
diff --git a/tools/manifest/tool.py b/tools/manifest/tool.py
index d80edfe..da1d45a 100644
--- a/tools/manifest/tool.py
+++ b/tools/manifest/tool.py
@@ -1,5 +1,5 @@
import os
-import time
+import datetime
import pwd
from .utils import effective_user
@@ -37,7 +37,7 @@
"""
Write to a log file in the tool's homedir
"""
- log_line = "%s %s" % (time.asctime(), message)
+ log_line = "%s %s" % (datetime.datetime.now().isoformat(), message)
log_path = os.path.join(self.home, 'service.log')
with effective_user(self.uid, self.gid):
--
To view, visit https://gerrit.wikimedia.org/r/203513
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic11a70e28288517b6f174d7066f71a12efd5f4f1
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/tools-manifest
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits