Update log function