Added the log function.