Most log lines contain a timestamp and event description:
[When] [What]
e.g.:
[23/Jul/20
@J.F. Sebestian - Thanks for your comment.
After some research I chose RFC 3339 / ISO 8601 in UTC, e.g.:
date -u "+[%Y-%m-%d %H:%M:%S%z (%Z)]" # Space separated with tz abbreviation
[2013-07-31 23:56:34+0000 (UTC)]
date -u "+[%Y-%m-%d %H:%M:%S.%N %z (%Z)]" # Space separated with nanoseconds and tz abbreviation
[2013-07-31 23:56:34.812572000 +0000 (UTC)]
Features:
[
,]
, useful for regexing the date awayI've also created a nice github project that helps with date formatting - feel free to take a look and suggest your own formats!