Skip to content

Commit e8003f2

Browse files
committedOct 1, 2015
[processing] write log dates in ISO format
fixes #13226
1 parent e27f6a1 commit e8003f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎python/plugins/processing/core/ProcessingLog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ProcessingLog:
4040
LOG_INFO = 'INFO'
4141
LOG_WARNING = 'WARNING'
4242
LOG_ALGORITHM = 'ALGORITHM'
43-
DATE_FORMAT = u'%a %b %d %Y %H:%M:%S'.encode('utf-8')
43+
DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
4444
recentAlgs = []
4545

4646
@staticmethod
@@ -53,7 +53,7 @@ def startLogging():
5353
encoding='utf-8')
5454
logfile.write('Started logging at ' +
5555
datetime.datetime.now().strftime(
56-
ProcessingLog.DATE_FORMAT).decode('utf-8') + '\n')
56+
ProcessingLog.DATE_FORMAT) + '\n')
5757
logfile.close()
5858

5959
@staticmethod
@@ -70,7 +70,7 @@ def addToLog(msgtype, msg):
7070
# to miss some log info that breaking the algorithm.
7171
if msgtype == ProcessingLog.LOG_ALGORITHM:
7272
line = msgtype + '|' + datetime.datetime.now().strftime(
73-
ProcessingLog.DATE_FORMAT).decode('utf-8') + '|' \
73+
ProcessingLog.DATE_FORMAT)+ '|' \
7474
+ msg + '\n'
7575
logfile = codecs.open(ProcessingLog.logFilename(), 'a',
7676
encoding='utf-8')

0 commit comments

Comments
 (0)