Code cleanup for logging.R.