add log function to logger and rename old log function to write