"add log function"