Refactor utils logger

Fix some jshint issues and reduce the number of function calls to get a _timestamp_ for logging.