Move the timestamp generation out of the formatMessage into its own method.