add log function to logger and rename old log function to write
Merge pull request #19 from gabilen/update_logger

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