Page MenuHomePhabricator

Use ISO-Date formatting for log output
Closed, WontfixPublic

Description

Currently, every log message includes the date/time in a strange, unusual and unpracticable format:

Www Mmm dd hh:mm:ss yyyy

Where Www is the weekday, Mmm the month (in letters), dd the day of the month, hh:mm:ss the time, and yyyy the year.

Example: Thu Apr 18 09:17:10 2013

This makes any postprocessing (e.g. sorting, filtering) unnecessary complex.

I suggest to use ISO Date format for log output: yyyy-mm-dd hh:mm:ss
This allows a simple string sort, is easily human readable, has a fixed number of characters and is more compact than the current formatting.

Currently, the ctime() function is used to create the date/time string. The new formatting can easily be created by using strftime() insteadt. As suggested in http://www.cplusplus.com/reference/ctime/ctime/

This would affect mbilog::TextBackendBase::AppendTimeStamp()

I volunteer to change this behavior, if the MITK guys agree.

Event Timeline

Yes, makes parsing at lot easier. And its extendable with the ISO UTC timezone offset when required.

kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.